Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_stockstransfers
This commit is contained in:
commit
73e741ca74
28
ChangeLog
28
ChangeLog
@ -2,6 +2,21 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
---------------
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook.
|
||||||
|
* Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale.
|
||||||
|
* The method static ActionComm::getActions($db, ...) is no more static. Use $actioncomm->getActions(...) instead (without $db param).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 14.0.2 compared to 14.0.1 *****
|
***** ChangeLog for 14.0.2 compared to 14.0.1 *****
|
||||||
|
|
||||||
FIX: #18353 Invoice list translation issue
|
FIX: #18353 Invoice list translation issue
|
||||||
@ -86,19 +101,6 @@ FIX: using Tulip, deposit mask was not saved
|
|||||||
FIX: #yogosha6907
|
FIX: #yogosha6907
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
|
||||||
|
|
||||||
For developers:
|
|
||||||
---------------
|
|
||||||
|
|
||||||
WARNING:
|
|
||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
|
||||||
* Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook.
|
|
||||||
* Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -81,7 +81,7 @@ If you don't have time to install it yourself, you can try some commercial 'read
|
|||||||
|
|
||||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||||
|
|
||||||
- At first make a backup of your Dolibarr files & than [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||||
|
|||||||
13
SECURITY.md
13
SECURITY.md
@ -5,10 +5,10 @@ This file contains some policies about the security reports on Dolibarr ERP CRM
|
|||||||
## Supported Versions for security reports
|
## Supported Versions for security reports
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ---------- | ------------------ |
|
| ---------- | ---------------------- |
|
||||||
| <= 14.0.1 | :x: |
|
| <= 14.0.1 | :x: |
|
||||||
| >= 14.0.2+ | :white_check_mark: |
|
| >= 14.0.2+ | :white_check_mark: except CSRF attacks|
|
||||||
|
| >= develop | :white_check_mark: |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
@ -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_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_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.
|
* $dolibarr_main_force_https must be set to something else than 0.
|
||||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 1 into backoffice menu Home - Setup - Other (this protection should be set to 1 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)
|
* 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).
|
* 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 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.
|
* 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.
|
* 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.
|
Scope is the web application (back office) and the APIs.
|
||||||
@ -90,9 +90,8 @@ Scope is the web application (back office) and the APIs.
|
|||||||
* Clickjacking/UI redressing
|
* Clickjacking/UI redressing
|
||||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||||
* Presence of autocomplete attribute on web forms
|
* Presence of autocomplete attribute on web forms
|
||||||
* Vulnerabilities affecting outdated browsers or platforms
|
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||||
* Missing cookie flags
|
|
||||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||||
|
|||||||
@ -57,7 +57,6 @@ RUN echo "host mail" >> /etc/msmtprc
|
|||||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||||
RUN echo "localhost localhost.localdomain" >> /etc/hosts
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,8 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- internal-pod
|
- internal-pod
|
||||||
- external-pod
|
- external-pod
|
||||||
|
extra_hosts:
|
||||||
|
- "localhost.localdomain:127.0.0.1"
|
||||||
|
|
||||||
mail:
|
mail:
|
||||||
image: maildev/maildev
|
image: maildev/maildev
|
||||||
|
|||||||
@ -171,7 +171,10 @@ if [ $res -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "$mydir/initdemopostsql.sql" ]; then
|
if [ -s "$mydir/initdemopostsql.sql" ]; then
|
||||||
|
echo A file initdemopostsql.sql was found, we execute it.
|
||||||
mysql -P$port $base < "$mydir/initdemopostsql.sql"
|
mysql -P$port $base < "$mydir/initdemopostsql.sql"
|
||||||
|
else
|
||||||
|
echo No file initdemopostsql.sql found, we extra sql action done.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ if (empty($reshook)) {
|
|||||||
} elseif ($action == 'enable' && $permissiontoadd) {
|
} elseif ($action == 'enable' && $permissiontoadd) {
|
||||||
if ($accounting->fetch($id)) {
|
if ($accounting->fetch($id)) {
|
||||||
$mode = GETPOST('mode', 'int');
|
$mode = GETPOST('mode', 'int');
|
||||||
$result = $accounting->account_activate($id, $mode);
|
$result = $accounting->accountActivate($id, $mode);
|
||||||
}
|
}
|
||||||
$action = 'update';
|
$action = 'update';
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $object = new AccountingAccount($db);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) {
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
$urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1);
|
$urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php';
|
||||||
header("Location: ".$urltogo);
|
header("Location: ".$urltogo);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
|||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
} else {
|
} else {
|
||||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid='.((int) $conf->global->CHARTOFACCOUNTS);
|
$sql = "SELECT pcg_version FROM " . MAIN_DB_PREFIX . "accounting_system WHERE rowid = ".((int) $conf->global->CHARTOFACCOUNTS);
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -121,7 +121,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
|||||||
}
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
|
setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
|
||||||
$urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1);
|
$urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php';
|
||||||
header("Location: " . $urltogo);
|
header("Location: " . $urltogo);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) {
|
|||||||
} else {
|
} else {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
$sql = 'SELECT pcg_version FROM '.MAIN_DB_PREFIX.'accounting_system WHERE rowid='.((int) $conf->global->CHARTOFACCOUNTS);
|
$sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid=".((int) $conf->global->CHARTOFACCOUNTS);
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
||||||
$result2 = $db->query($sql);
|
$result2 = $db->query($sql);
|
||||||
@ -260,7 +260,7 @@ if ($action == 'create') {
|
|||||||
print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
||||||
// autosuggest from existing account types if found
|
// autosuggest from existing account types if found
|
||||||
print '<datalist id="pcg_type_datalist">';
|
print '<datalist id="pcg_type_datalist">';
|
||||||
$sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
|
$sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account";
|
||||||
$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
|
$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
|
||||||
$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
|
$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
|
||||||
$sql .= ' LIMIT 50000'; // just as a sanity check
|
$sql .= ' LIMIT 50000'; // just as a sanity check
|
||||||
|
|||||||
@ -811,7 +811,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Modify link
|
// Modify link
|
||||||
if ($canbemodified) {
|
if ($canbemodified) {
|
||||||
print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
}
|
}
|
||||||
@ -820,7 +820,7 @@ if ($resql) {
|
|||||||
if ($iserasable) {
|
if ($iserasable) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($user->admin) {
|
if ($user->admin) {
|
||||||
print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
|
print '<a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
|
||||||
}
|
}
|
||||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -439,13 +439,13 @@ if ($resql) {
|
|||||||
$e = '';
|
$e = '';
|
||||||
// Customer
|
// Customer
|
||||||
if ($obj->type == 1) {
|
if ($obj->type == 1) {
|
||||||
$e .= '<a class="editfielda" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
$e .= '<a class="editfielda" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&token='.newToken().'&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
||||||
} elseif ($obj->type == 2) {
|
} elseif ($obj->type == 2) {
|
||||||
// Supplier
|
// Supplier
|
||||||
$e .= '<a class="editfielda" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
$e .= '<a class="editfielda" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&token='.newToken().'&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
||||||
} elseif ($obj->type == 3) {
|
} elseif ($obj->type == 3) {
|
||||||
// User
|
// User
|
||||||
$e .= '<a class="editfielda" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?action=edit&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
$e .= '<a class="editfielda" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
|
||||||
}
|
}
|
||||||
print $e;
|
print $e;
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|||||||
@ -433,7 +433,7 @@ if ($action == 'create') {
|
|||||||
print $langs->trans('Docdate');
|
print $langs->trans('Docdate');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editdate') {
|
if ($action != 'editdate') {
|
||||||
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdate&piece_num='.$object->piece_num.'&mode='.$mode.'">'.img_edit($langs->transnoentitiesnoconv('SetDate'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdate&token='.newToken().'&piece_num='.urlencode($object->piece_num).'&mode='.urlencode($mode).'">'.img_edit($langs->transnoentitiesnoconv('SetDate'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
@ -460,7 +460,7 @@ if ($action == 'create') {
|
|||||||
print $langs->trans('Codejournal');
|
print $langs->trans('Codejournal');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editjournal') {
|
if ($action != 'editjournal') {
|
||||||
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editjournal&piece_num='.$object->piece_num.'&mode='.$mode.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editjournal&token='.newToken().'&piece_num='.urlencode($object->piece_num).'&mode='.urlencode($mode).'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -487,7 +487,7 @@ if ($action == 'create') {
|
|||||||
print $langs->trans('Piece');
|
print $langs->trans('Piece');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editdocref') {
|
if ($action != 'editdocref') {
|
||||||
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdocref&piece_num='.$object->piece_num.'&mode='.$mode.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdocref&token='.newToken().'&piece_num='.urlencode($object->piece_num).'&mode='.urlencode($mode).'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
|
|||||||
@ -591,7 +591,7 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||||||
|
|
||||||
if (!empty($accountancyexport->errors)) {
|
if (!empty($accountancyexport->errors)) {
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||||
} elseif (!$notifiedexportdate || !$notifiedvalidationdate) {
|
} elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
|
||||||
// Specify as export : update field date_export or date_validated
|
// Specify as export : update field date_export or date_validated
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -602,17 +602,18 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||||||
|
|
||||||
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||||
$sql .= " SET";
|
$sql .= " SET";
|
||||||
if (!$notifiedexportdate && !$notifiedvalidationdate) {
|
if (!empty($notifiedexportdate) && !empty($notifiedvalidationdate)) {
|
||||||
$sql .= " date_export = '".$db->idate($now)."'";
|
$sql .= " date_export = '".$db->idate($now)."'";
|
||||||
$sql .= ", date_validated = '".$db->idate($now)."'";
|
$sql .= ", date_validated = '".$db->idate($now)."'";
|
||||||
} elseif (!$notifiedexportdate) {
|
} elseif (!empty($notifiedexportdate)) {
|
||||||
$sql .= " date_export = '".$db->idate($now)."'";
|
$sql .= " date_export = '".$db->idate($now)."'";
|
||||||
} elseif (!$notifiedvalidationdate) {
|
} elseif (!empty($notifiedvalidationdate)) {
|
||||||
$sql .= " date_validated = '".$db->idate($now)."'";
|
$sql .= " date_validated = '".$db->idate($now)."'";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE rowid = ".((int) $movement->id);
|
$sql .= " WHERE rowid = ".((int) $movement->id);
|
||||||
|
|
||||||
dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported", LOG_DEBUG);
|
dol_syslog("/accountancy/bookkeeping/list.php Function export_file Specify movements as exported", LOG_DEBUG);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -1250,7 +1251,7 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
if (empty($line->date_validation)) {
|
if (empty($line->date_validation)) {
|
||||||
if ($user->rights->accounting->mouvements->supprimer) {
|
if ($user->rights->accounting->mouvements->supprimer) {
|
||||||
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&token='.newToken().'&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1274,7 +1275,7 @@ print '</div>';
|
|||||||
// TODO Replace this with mass delete action
|
// TODO Replace this with mass delete action
|
||||||
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
||||||
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
||||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear&token='.newToken().($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -904,7 +904,7 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
if (empty($line->date_validation)) {
|
if (empty($line->date_validation)) {
|
||||||
if ($user->rights->accounting->mouvements->supprimer) {
|
if ($user->rights->accounting->mouvements->supprimer) {
|
||||||
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&token='.newToken().'&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -957,7 +957,7 @@ print '</div>';
|
|||||||
// TODO Replace this with mass delete action
|
// TODO Replace this with mass delete action
|
||||||
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
||||||
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
||||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear&token='.newToken().($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -915,7 +915,7 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
if (empty($line->date_validation)) {
|
if (empty($line->date_validation)) {
|
||||||
if ($user->rights->accounting->mouvements->supprimer) {
|
if ($user->rights->accounting->mouvements->supprimer) {
|
||||||
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
print '<a class="reposition paddingleft marginrightonly" href="'.$_SERVER['PHP_SELF'].'?action=delmouv&token='.newToken().'&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -968,7 +968,7 @@ print '</div>';
|
|||||||
// TODO Replace this with mass delete action
|
// TODO Replace this with mass delete action
|
||||||
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
||||||
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
||||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear&token='.newToken().($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,8 +121,8 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
|
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
|
||||||
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
|
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
|
||||||
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
|
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
|
||||||
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
|
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinumv3'),
|
||||||
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinumv5'),
|
||||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||||
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
||||||
self::$EXPORT_TYPE_ISUITEEXPERT => 'Export iSuite Expert',
|
self::$EXPORT_TYPE_ISUITEEXPERT => 'Export iSuite Expert',
|
||||||
@ -527,14 +527,19 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export format : Quadratus
|
* Export format : Quadratus (Format ASCII)
|
||||||
|
* Format since 2015 compatible QuadraCOMPTA
|
||||||
|
* Last review for this format : 2021/09/13 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
||||||
|
*
|
||||||
|
* Help : https://docplayer.fr/20769649-Fichier-d-entree-ascii-dans-quadracompta.html
|
||||||
|
* In QuadraCompta | Use menu : "Outils" > "Suivi des dossiers" > "Import ASCII(Compta)"
|
||||||
*
|
*
|
||||||
* @param array $TData data
|
* @param array $TData data
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportQuadratus(&$TData)
|
public function exportQuadratus(&$TData)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf, $db;
|
||||||
|
|
||||||
$end_line = "\r\n";
|
$end_line = "\r\n";
|
||||||
|
|
||||||
@ -547,6 +552,44 @@ class AccountancyExport
|
|||||||
$code_compta = $data->subledger_account;
|
$code_compta = $data->subledger_account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$Tab = array();
|
||||||
|
|
||||||
|
if (!empty($data->subledger_account)) {
|
||||||
|
$Tab['type_ligne'] = 'C';
|
||||||
|
$Tab['num_compte'] = str_pad(self::trunc($data->subledger_account, 8), 8);
|
||||||
|
$Tab['lib_compte'] = str_pad(self::trunc($data->subledger_label, 30), 30);
|
||||||
|
|
||||||
|
if ($data->doc_type == 'customer_invoice') {
|
||||||
|
$Tab['lib_alpha'] = strtoupper(str_pad('C'.self::trunc($data->subledger_label, 6), 6));
|
||||||
|
$Tab['filler'] = str_repeat(' ', 52);
|
||||||
|
$Tab['coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, 8), 8);
|
||||||
|
} elseif ($data->doc_type == 'supplier_invoice') {
|
||||||
|
$Tab['lib_alpha'] = strtoupper(str_pad('F'.self::trunc($data->subledger_label, 6), 6));
|
||||||
|
$Tab['filler'] = str_repeat(' ', 52);
|
||||||
|
$Tab['coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, 8), 8);
|
||||||
|
} else {
|
||||||
|
$Tab['filler'] = str_repeat(' ', 59);
|
||||||
|
$Tab['coll_compte'] = str_pad(' ', 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
$Tab['filler2'] = str_repeat(' ', 110);
|
||||||
|
$Tab['Maj'] = 2; // Partial update (alpha key, label, address, collectif, RIB)
|
||||||
|
|
||||||
|
if ($data->doc_type == 'customer_invoice') {
|
||||||
|
$Tab['type_compte'] = 'C';
|
||||||
|
} elseif ($data->doc_type == 'supplier_invoice') {
|
||||||
|
$Tab['coll_compte'] = 'F';
|
||||||
|
} else {
|
||||||
|
$Tab['coll_compte'] = 'G';
|
||||||
|
}
|
||||||
|
|
||||||
|
$Tab['filler3'] = str_repeat(' ', 235);
|
||||||
|
|
||||||
|
$Tab['end_line'] = $end_line;
|
||||||
|
|
||||||
|
print implode($Tab);
|
||||||
|
}
|
||||||
|
|
||||||
$Tab = array();
|
$Tab = array();
|
||||||
$Tab['type_ligne'] = 'M';
|
$Tab['type_ligne'] = 'M';
|
||||||
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 8), 8);
|
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 8), 8);
|
||||||
@ -881,7 +924,7 @@ class AccountancyExport
|
|||||||
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
||||||
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
||||||
$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
|
$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
|
||||||
$date_validation = dol_print_date($line->date_validated, '%Y%m%d');
|
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||||
|
|
||||||
// FEC:JournalCode
|
// FEC:JournalCode
|
||||||
@ -987,7 +1030,7 @@ class AccountancyExport
|
|||||||
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
||||||
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
||||||
$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
|
$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
|
||||||
$date_validation = dol_print_date($line->date_validated, '%Y%m%d');
|
$date_validation = dol_print_date($line->date_validation, '%Y%m%d');
|
||||||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||||
|
|
||||||
// FEC:JournalCode
|
// FEC:JournalCode
|
||||||
|
|||||||
@ -26,6 +26,9 @@
|
|||||||
* \brief File of class to manage accounting accounts
|
* \brief File of class to manage accounting accounts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
/**
|
/**
|
||||||
* Class to manage accounting accounts
|
* Class to manage accounting accounts
|
||||||
*/
|
*/
|
||||||
@ -140,6 +143,11 @@ class AccountingAccount extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $reconcilable;
|
public $reconcilable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array cache array
|
||||||
|
*/
|
||||||
|
private $accountingaccount_codetotid_cache = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -259,7 +267,7 @@ class AccountingAccount extends CommonObject
|
|||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
|
|
||||||
// Insert request
|
// Insert request
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_account(";
|
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_account(";
|
||||||
$sql .= "datec";
|
$sql .= "datec";
|
||||||
$sql .= ", entity";
|
$sql .= ", entity";
|
||||||
$sql .= ", fk_pcg_version";
|
$sql .= ", fk_pcg_version";
|
||||||
@ -293,11 +301,11 @@ class AccountingAccount extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = "Error ".$this->db->lasterror();
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_account");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_account");
|
||||||
|
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action to call a trigger.
|
// want this action to call a trigger.
|
||||||
@ -313,8 +321,8 @@ class AccountingAccount extends CommonObject
|
|||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ($this->errors as $errmsg) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1 * $error;
|
return -1 * $error;
|
||||||
@ -339,18 +347,18 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account ";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||||
$sql .= " SET fk_pcg_version = ".($this->fk_pcg_version ? "'".$this->db->escape($this->fk_pcg_version)."'" : "null");
|
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
|
||||||
$sql .= " , pcg_type = ".($this->pcg_type ? "'".$this->db->escape($this->pcg_type)."'" : "null");
|
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
|
||||||
$sql .= " , account_number = '".$this->db->escape($this->account_number)."'";
|
$sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'";
|
||||||
$sql .= " , account_parent = ".(int) $this->account_parent;
|
$sql .= " , account_parent = " . (int) $this->account_parent;
|
||||||
$sql .= " , label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "''");
|
$sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "''");
|
||||||
$sql .= " , labelshort = ".($this->labelshort ? "'".$this->db->escape($this->labelshort)."'" : "''");
|
$sql .= " , labelshort = " . ($this->labelshort ? "'" . $this->db->escape($this->labelshort) . "'" : "''");
|
||||||
$sql .= " , fk_accounting_category = ".(empty($this->account_category) ? 0 : (int) $this->account_category);
|
$sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : (int) $this->account_category);
|
||||||
$sql .= " , fk_user_modif = ".((int) $user->id);
|
$sql .= " , fk_user_modif = " . ((int) $user->id);
|
||||||
$sql .= " , active = ".(int) $this->active;
|
$sql .= " , active = " . (int) $this->active;
|
||||||
$sql .= " , reconcilable = ".(int) $this->reconcilable;
|
$sql .= " , reconcilable = " . (int) $this->reconcilable;
|
||||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
$sql .= " WHERE rowid = " . ((int) $this->id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
@ -413,22 +421,22 @@ class AccountingAccount extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."accounting_account";
|
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_account";
|
||||||
$sql .= " WHERE rowid=".((int) $this->id);
|
$sql .= " WHERE rowid=" . ((int) $this->id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
dol_syslog(get_class($this) . "::delete sql=" . $sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = "Error ".$this->db->lasterror();
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ($this->errors as $errmsg) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1 * $error;
|
return -1 * $error;
|
||||||
@ -457,7 +465,7 @@ class AccountingAccount extends CommonObject
|
|||||||
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '')
|
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '')
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
|
||||||
if (!empty($conf->dol_no_mouse_hover)) {
|
if (!empty($conf->dol_no_mouse_hover)) {
|
||||||
$notooltip = 1; // Force disable tooltips
|
$notooltip = 1; // Force disable tooltips
|
||||||
@ -465,15 +473,16 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$url = ''; $labelurl = '';
|
$url = '';
|
||||||
|
$labelurl = '';
|
||||||
if (empty($option) || $option == 'ledger') {
|
if (empty($option) || $option == 'ledger') {
|
||||||
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
$url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . urlencode($this->account_number) . '&search_accountancy_code_end=' . urlencode($this->account_number);
|
||||||
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
||||||
} elseif ($option == 'journals') {
|
} elseif ($option == 'journals') {
|
||||||
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
$url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . urlencode($this->account_number) . '&search_accountancy_code_end=' . urlencode($this->account_number);
|
||||||
$labelurl = $langs->trans("ShowAccountingAccountInJournals");
|
$labelurl = $langs->trans("ShowAccountingAccountInJournals");
|
||||||
} elseif ($option == 'accountcard') {
|
} elseif ($option == 'accountcard') {
|
||||||
$url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.urlencode($this->id);
|
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . urlencode($this->id);
|
||||||
$labelurl = $langs->trans("ShowAccountingAccount");
|
$labelurl = $langs->trans("ShowAccountingAccount");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,29 +504,29 @@ class AccountingAccount extends CommonObject
|
|||||||
$labeltoshow = $this->labelshort;
|
$labeltoshow = $this->labelshort;
|
||||||
}
|
}
|
||||||
|
|
||||||
$label = '<u>'.$labelurl.'</u>';
|
$label = '<u>' . $labelurl . '</u>';
|
||||||
if (!empty($this->account_number)) {
|
if (!empty($this->account_number)) {
|
||||||
$label .= '<br><b>'.$langs->trans('AccountAccounting').':</b> '.length_accountg($this->account_number);
|
$label .= '<br><b>' . $langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number);
|
||||||
}
|
}
|
||||||
if (!empty($labeltoshow)) {
|
if (!empty($labeltoshow)) {
|
||||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow;
|
$label .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $labeltoshow;
|
||||||
}
|
}
|
||||||
if ($moretitle) {
|
if ($moretitle) {
|
||||||
$label .= ' - '.$moretitle;
|
$label .= ' - ' . $moretitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkclose = '';
|
$linkclose = '';
|
||||||
if (empty($notooltip)) {
|
if (empty($notooltip)) {
|
||||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
$label = $labelurl;
|
$label = $labelurl;
|
||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
|
||||||
}
|
}
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' title="' . dol_escape_htmltag($label, 1) . '"';
|
||||||
$linkclose .= ' class="classfortooltip"';
|
$linkclose .= ' class="classfortooltip"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="' . $url . '"';
|
||||||
$linkstart .= $linkclose.'>';
|
$linkstart .= $linkclose . '>';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
if ($nourl) {
|
if ($nourl) {
|
||||||
@ -528,17 +537,17 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
$label_link = length_accountg($this->account_number);
|
$label_link = length_accountg($this->account_number);
|
||||||
if ($withlabel) {
|
if ($withlabel) {
|
||||||
$label_link .= ' - '.($nourl ? '<span class="opacitymedium">' : '').$labeltoshow.($nourl ? '</span>' : '');
|
$label_link .= ' - ' . ($nourl ? '<span class="opacitymedium">' : '') . $labeltoshow . ($nourl ? '</span>' : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
$result .= ($linkstart.img_object(($notooltip ? '' : $label), $picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend);
|
$result .= ($linkstart . img_object(($notooltip ? '' : $label), $picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1) . $linkend);
|
||||||
}
|
}
|
||||||
if ($withpicto && $withpicto != 2) {
|
if ($withpicto && $withpicto != 2) {
|
||||||
$result .= ' ';
|
$result .= ' ';
|
||||||
}
|
}
|
||||||
if ($withpicto != 2) {
|
if ($withpicto != 2) {
|
||||||
$result .= $linkstart.$label_link.$linkend;
|
$result .= $linkstart . $label_link . $linkend;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -552,10 +561,10 @@ class AccountingAccount extends CommonObject
|
|||||||
public function info($id)
|
public function info($id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
|
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'accounting_account as a';
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a';
|
||||||
$sql .= ' WHERE a.rowid = '.((int) $id);
|
$sql .= ' WHERE a.rowid = ' . ((int) $id);
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::info sql='.$sql);
|
dol_syslog(get_class($this) . '::info sql=' . $sql);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -620,7 +629,7 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* Account activated
|
* Account activated
|
||||||
*
|
*
|
||||||
@ -628,7 +637,7 @@ class AccountingAccount extends CommonObject
|
|||||||
* @param int $mode 0=field active, 1=field reconcilable
|
* @param int $mode 0=field active, 1=field reconcilable
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function account_activate($id, $mode = 0)
|
public function accountActivate($id, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -654,7 +663,6 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le libelle du statut d'un user (actif, inactif)
|
* Retourne le libelle du statut d'un user (actif, inactif)
|
||||||
*
|
*
|
||||||
@ -694,9 +702,9 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
} elseif ($mode == 2) {
|
} elseif ($mode == 2) {
|
||||||
if ($status == 1) {
|
if ($status == 1) {
|
||||||
return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled');
|
return img_picto($langs->trans('Enabled'), 'statut4') . ' ' . $langs->trans('Enabled');
|
||||||
} elseif ($status == 0) {
|
} elseif ($status == 0) {
|
||||||
return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled');
|
return img_picto($langs->trans('Disabled'), 'statut5') . ' ' . $langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
} elseif ($mode == 3) {
|
} elseif ($mode == 3) {
|
||||||
if ($status == 1) {
|
if ($status == 1) {
|
||||||
@ -706,15 +714,173 @@ class AccountingAccount extends CommonObject
|
|||||||
}
|
}
|
||||||
} elseif ($mode == 4) {
|
} elseif ($mode == 4) {
|
||||||
if ($status == 1) {
|
if ($status == 1) {
|
||||||
return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled');
|
return img_picto($langs->trans('Enabled'), 'statut4') . ' ' . $langs->trans('Enabled');
|
||||||
} elseif ($status == 0) {
|
} elseif ($status == 0) {
|
||||||
return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled');
|
return img_picto($langs->trans('Disabled'), 'statut5') . ' ' . $langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
} elseif ($mode == 5) {
|
} elseif ($mode == 5) {
|
||||||
if ($status == 1) {
|
if ($status == 1) {
|
||||||
return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4');
|
return $langs->trans('Enabled') . ' ' . img_picto($langs->trans('Enabled'), 'statut4');
|
||||||
} elseif ($status == 0) {
|
} elseif ($status == 0) {
|
||||||
return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5');
|
return $langs->trans('Disabled') . ' ' . img_picto($langs->trans('Disabled'), 'statut5');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Suggest accounting accounts to bind
|
||||||
|
*
|
||||||
|
* @param Societe $buyer Societe Object Buyers
|
||||||
|
* @param $seller Company Object seller
|
||||||
|
* @param Product $product Product object sell or buy
|
||||||
|
* @param Facture $facture Facture
|
||||||
|
* @param FactureLigne $factureDet Facture Det
|
||||||
|
* @param array $accountingAccount array of Account account
|
||||||
|
*
|
||||||
|
* @return array Accounting accounts suggested
|
||||||
|
*/
|
||||||
|
public function getAccountingCodeToBind(Societe $buyer, $seller, Product $product, Facture $facture, FactureLigne $factureDet, $accountingAccount = array())
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
global $hookmanager;
|
||||||
|
|
||||||
|
// Instantiate hooks for external modules
|
||||||
|
$hookmanager->initHooks(array('accoutancyBindingCalculation'));
|
||||||
|
|
||||||
|
// Execute hook accoutancyBindingCalculation
|
||||||
|
$parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount'=>$accountingAccount);
|
||||||
|
$reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
if (empty($reshook)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||||
|
$isBuyerInEEC = isInEEC($buyer);
|
||||||
|
$isSellerInEEC = isInEEC($seller);
|
||||||
|
$code_sell_l = '';
|
||||||
|
$code_sell_p = '';
|
||||||
|
$code_sell_t = '';
|
||||||
|
$suggestedid = '';
|
||||||
|
|
||||||
|
// Level 1: Search suggested default account for product/service
|
||||||
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
|
if ($factureDet->product_type == 1) {
|
||||||
|
if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
|
} else {
|
||||||
|
if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eecwithvat';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eec';
|
||||||
|
} else { // Foreign sale
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'export';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($factureDet->product_type == 0) {
|
||||||
|
if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = '';
|
||||||
|
} else {
|
||||||
|
if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eecwithvat';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'eec';
|
||||||
|
} else {
|
||||||
|
$code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : '');
|
||||||
|
$suggestedaccountingaccountbydefaultfor = 'export';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($code_sell_l == -1) {
|
||||||
|
$code_sell_l = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding)
|
||||||
|
$suggestedaccountingaccountfor = '';
|
||||||
|
if ((($buyer->country_code == $seller->country_code) || empty($buyer->country_code)) && !empty($product->accountancy_code_sell)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
||||||
|
$code_sell_p = $product->accountancy_code_sell;
|
||||||
|
$suggestedid = $accountingAccount['dom'];
|
||||||
|
$suggestedaccountingaccountfor = 'prodserv';
|
||||||
|
} else {
|
||||||
|
if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0 && !empty($product->accountancy_code_sell)) { // European intravat sale, but with VAT
|
||||||
|
$code_sell_p = $product->accountancy_code_sell;
|
||||||
|
$suggestedid = $accountingAccount['dom'];
|
||||||
|
$suggestedaccountingaccountfor = 'eecwithvat';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra) && !empty($product->accountancy_code_sell)) { // European intravat sale, without VAT intra community number
|
||||||
|
$code_sell_p = $product->accountancy_code_sell;
|
||||||
|
$suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ?
|
||||||
|
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
||||||
|
} elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) { // European intravat sale
|
||||||
|
$code_sell_p = $product->accountancy_code_sell_intra;
|
||||||
|
$suggestedid = $accountingAccount['intra'];
|
||||||
|
$suggestedaccountingaccountfor = 'eec';
|
||||||
|
} elseif (!empty($product->accountancy_code_sell_export)) { // Foreign sale
|
||||||
|
$code_sell_p = $product->accountancy_code_sell_export;
|
||||||
|
$suggestedid = $accountingAccount['export'];
|
||||||
|
$suggestedaccountingaccountfor = 'export';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||||
|
if (!empty($buyer->code_compta)) {
|
||||||
|
$code_sell_t = $buyer->code_compta;
|
||||||
|
$suggestedid = $accountingAccount['thirdparty'];
|
||||||
|
$suggestedaccountingaccountfor = 'thridparty';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Manage Deposit
|
||||||
|
if ($factureDet->desc == "(DEPOSIT)") {
|
||||||
|
$accountdeposittoventilated = new self($this->db);
|
||||||
|
$result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
||||||
|
if ($result < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$code_sell_l = $accountdeposittoventilated->ref;
|
||||||
|
$suggestedid = $accountdeposittoventilated->rowid;
|
||||||
|
$suggestedaccountingaccountfor = 'deposit';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($suggestedid) && empty($code_sell_p) && !empty($code_sell_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) {
|
||||||
|
if (empty($this->accountingaccount_codetotid_cache[$code_sell_l])) {
|
||||||
|
$tmpaccount = new self($this->db);
|
||||||
|
$result = $tmpaccount->fetch(0, $code_sell_l, 1);
|
||||||
|
if ($result < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if ($tmpaccount->id > 0) {
|
||||||
|
$suggestedid = $tmpaccount->id;
|
||||||
|
}
|
||||||
|
$this->accountingaccount_codetotid_cache[$code_sell_l] = $tmpaccount->id;
|
||||||
|
} else {
|
||||||
|
$suggestedid = $this->accountingaccount_codetotid_cache[$code_sell_l];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array(
|
||||||
|
'suggestedaccountingaccountbydefaultfor' => $suggestedaccountingaccountbydefaultfor,
|
||||||
|
'suggestedaccountingaccountfor' => $suggestedaccountingaccountfor,
|
||||||
|
'suggestedid' => $suggestedid,
|
||||||
|
'code_sell_l' => $code_sell_l,
|
||||||
|
'code_sell_p' => $code_sell_p,
|
||||||
|
'code_sell_t' => $code_sell_t,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (is_array($hookmanager->resArray) && !empty($hookmanager->resArray)) {
|
||||||
|
return $hookmanager->resArray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -888,9 +888,11 @@ class BookKeeping extends CommonObject
|
|||||||
// Affichage par compte comptable
|
// Affichage par compte comptable
|
||||||
if (!empty($option)) {
|
if (!empty($option)) {
|
||||||
$sql .= ' AND t.subledger_account IS NOT NULL';
|
$sql .= ' AND t.subledger_account IS NOT NULL';
|
||||||
$sql .= ' ORDER BY t.subledger_account ASC';
|
$sortfield = 't.subledger_account'.($sortfield ? ','.$sortfield : '');
|
||||||
|
$sortorder = 'ASC'.($sortfield ? ','.$sortfield : '');
|
||||||
} else {
|
} else {
|
||||||
$sql .= ' ORDER BY t.numero_compte ASC';
|
$sortfield = 't.numero_compte'.($sortfield ? ','.$sortfield : '');
|
||||||
|
$sortorder = 'ASC'.($sortorder ? ','.$sortorder : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= $this->db->order($sortfield, $sortorder);
|
$sql .= $this->db->order($sortfield, $sortorder);
|
||||||
|
|||||||
@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
$langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
||||||
@ -46,6 +47,7 @@ if (!$user->rights->accounting->bind->write) {
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$accountingAccount = new AccountingAccount($db);
|
||||||
|
|
||||||
$month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
$month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||||
if (GETPOST("year", 'int')) {
|
if (GETPOST("year", 'int')) {
|
||||||
@ -172,35 +174,75 @@ if ($action == 'validatehistory') {
|
|||||||
|
|
||||||
$isSellerInEEC = isInEEC($mysoc);
|
$isSellerInEEC = isInEEC($mysoc);
|
||||||
|
|
||||||
|
$thirdpartystatic = new Societe($db);
|
||||||
|
$facture_static = new Facture($db);
|
||||||
|
$facture_static_det = new FactureLigne($db);
|
||||||
|
$product_static = new Product($db);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
|
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$isBuyerInEEC = isInEEC($objp); // This make a database request but there is a cache into $conf->cache['country_code_in_EEC']
|
$thirdpartystatic->id = $objp->socid;
|
||||||
|
$thirdpartystatic->name = $objp->name;
|
||||||
|
$thirdpartystatic->client = $objp->client;
|
||||||
|
$thirdpartystatic->fournisseur = $objp->fournisseur;
|
||||||
|
$thirdpartystatic->code_client = $objp->code_client;
|
||||||
|
$thirdpartystatic->code_compta_client = $objp->code_compta_client;
|
||||||
|
$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
|
||||||
|
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||||
|
$thirdpartystatic->email = $objp->email;
|
||||||
|
$thirdpartystatic->country_code = $objp->country_code;
|
||||||
|
$thirdpartystatic->tva_intra = $objp->tva_intra;
|
||||||
|
$thirdpartystatic->code_compta = $objp->company_code_sell;
|
||||||
|
|
||||||
// Level 2: Search suggested account for product/service (similar code exists in page list.php to make manual binding)
|
$product_static->ref = $objp->product_ref;
|
||||||
$suggestedaccountingaccountfor = '';
|
$product_static->id = $objp->product_id;
|
||||||
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
$product_static->type = $objp->type;
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
$product_static->label = $objp->product_label;
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
$product_static->status = $objp->status;
|
||||||
$suggestedaccountingaccountfor = '';
|
$product_static->status_buy = $objp->status_buy;
|
||||||
|
$product_static->accountancy_code_sell = $objp->code_sell;
|
||||||
|
$product_static->accountancy_code_sell_intra = $objp->code_sell_intra;
|
||||||
|
$product_static->accountancy_code_sell_export = $objp->code_sell_export;
|
||||||
|
$product_static->accountancy_code_buy = $objp->code_buy;
|
||||||
|
$product_static->accountancy_code_buy_intra = $objp->code_buy_intra;
|
||||||
|
$product_static->accountancy_code_buy_export = $objp->code_buy_export;
|
||||||
|
$product_static->tva_tx = $objp->tva_tx_prod;
|
||||||
|
$product_static->tva_tx = $objp->tva_tx_prod;
|
||||||
|
|
||||||
|
$facture_static->ref = $objp->ref;
|
||||||
|
$facture_static->id = $objp->facid;
|
||||||
|
$facture_static->type = $objp->ftype;
|
||||||
|
$facture_static->datef = $objp->datef;
|
||||||
|
|
||||||
|
$facture_static_det->id = $objp->rowid;
|
||||||
|
$facture_static_det->total_ht = $objp->total_ht;
|
||||||
|
$facture_static_det->tva_tx = $objp->tva_tx_line;
|
||||||
|
$facture_static_det->vat_src_code = $objp->vat_src_code;
|
||||||
|
$facture_static_det->product_type = $objp->type_l;
|
||||||
|
$facture_static_det->desc = $objp->description;
|
||||||
|
|
||||||
|
$accoutinAccountArray = array(
|
||||||
|
'dom'=>$objp->aarowid,
|
||||||
|
'intra'=>$objp->aarowid_intra,
|
||||||
|
'export'=>$objp->aarowid_export,
|
||||||
|
'thirdparty' =>$objp->aarowid_thirdparty);
|
||||||
|
|
||||||
|
$code_sell_p_notset = '';
|
||||||
|
$code_sell_t_notset = '';
|
||||||
|
|
||||||
|
$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accoutinAccountArray);
|
||||||
|
if (!is_array($return) && $return<0) {
|
||||||
|
setEventMessage($accountingAccount->error, 'errors');
|
||||||
} else {
|
} else {
|
||||||
if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with VAT
|
$suggestedid=$return['suggestedid'];
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
|
||||||
$suggestedaccountingaccountfor = 'eecwithvat';
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number
|
$suggestedid=$return['suggestedid'];
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
} else {
|
||||||
$objp->aarowid_suggest = 0; // There is a doubt, no automatic binding
|
$suggestedid=0;
|
||||||
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
|
||||||
$objp->code_sell_p = $objp->code_sell_intra;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid_intra;
|
|
||||||
$suggestedaccountingaccountfor = 'eec';
|
|
||||||
} else { // Foreign sale
|
|
||||||
$objp->code_sell_p = $objp->code_sell_export;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid_export;
|
|
||||||
$suggestedaccountingaccountfor = 'export';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,8 +257,8 @@ if ($action == 'validatehistory') {
|
|||||||
|
|
||||||
if ($objp->aarowid_suggest > 0) {
|
if ($objp->aarowid_suggest > 0) {
|
||||||
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||||
$sqlupdate .= " SET fk_code_ventilation = ".((int) $objp->aarowid_suggest);
|
$sqlupdate .= " SET fk_code_ventilation = ".((int) $suggestedid);
|
||||||
$sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $objp->rowid);
|
$sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $facture_static_det->id);
|
||||||
|
|
||||||
$resqlupdate = $db->query($sqlupdate);
|
$resqlupdate = $db->query($sqlupdate);
|
||||||
if (!$resqlupdate) {
|
if (!$resqlupdate) {
|
||||||
|
|||||||
@ -369,9 +369,9 @@ if ($result) {
|
|||||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneCustomer").'</span><br>';
|
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneCustomer").'</span><br>';
|
||||||
|
|
||||||
print '<br><div class="inline-block divButAction">'.$langs->trans("ChangeAccount").'<br>';
|
print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
|
||||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||||
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
print '<input type="submit" class="button small valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,7 @@ $massaction = GETPOST('massaction', 'alpha');
|
|||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
|
||||||
// Select Box
|
// Select Box
|
||||||
$mesCasesCochees = GETPOST('toselect', 'array');
|
$mesCasesCochees = GETPOST('toselect', 'array');
|
||||||
@ -96,6 +97,7 @@ if (!$sortorder) {
|
|||||||
$hookmanager->initHooks(array('accountancycustomerlist'));
|
$hookmanager->initHooks(array('accountancycustomerlist'));
|
||||||
|
|
||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
|
$accountingAccount = new AccountingAccount($db);
|
||||||
|
|
||||||
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
||||||
|
|
||||||
@ -510,17 +512,17 @@ if ($result) {
|
|||||||
|
|
||||||
$thirdpartystatic = new Societe($db);
|
$thirdpartystatic = new Societe($db);
|
||||||
$facture_static = new Facture($db);
|
$facture_static = new Facture($db);
|
||||||
|
$facture_static_det = new FactureLigne($db);
|
||||||
$product_static = new Product($db);
|
$product_static = new Product($db);
|
||||||
|
|
||||||
$isSellerInEEC = isInEEC($mysoc);
|
|
||||||
|
|
||||||
$accountingaccount_codetotid_cache = array();
|
$accountingaccount_codetotid_cache = array();
|
||||||
|
|
||||||
while ($i < min($num_lines, $limit)) {
|
while ($i < min($num_lines, $limit)) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$objp->code_sell_l = '';
|
$code_sell_l = '';
|
||||||
$objp->code_sell_p = '';
|
$code_sell_p = '';
|
||||||
|
|
||||||
$thirdpartystatic->id = $objp->socid;
|
$thirdpartystatic->id = $objp->socid;
|
||||||
$thirdpartystatic->name = $objp->name;
|
$thirdpartystatic->name = $objp->name;
|
||||||
@ -532,6 +534,8 @@ if ($result) {
|
|||||||
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||||
$thirdpartystatic->email = $objp->email;
|
$thirdpartystatic->email = $objp->email;
|
||||||
$thirdpartystatic->country_code = $objp->country_code;
|
$thirdpartystatic->country_code = $objp->country_code;
|
||||||
|
$thirdpartystatic->tva_intra = $objp->tva_intra;
|
||||||
|
$thirdpartystatic->code_compta = $objp->company_code_sell;
|
||||||
|
|
||||||
$product_static->ref = $objp->product_ref;
|
$product_static->ref = $objp->product_ref;
|
||||||
$product_static->id = $objp->product_id;
|
$product_static->id = $objp->product_id;
|
||||||
@ -545,146 +549,84 @@ if ($result) {
|
|||||||
$product_static->accountancy_code_buy = $objp->code_buy;
|
$product_static->accountancy_code_buy = $objp->code_buy;
|
||||||
$product_static->accountancy_code_buy_intra = $objp->code_buy_intra;
|
$product_static->accountancy_code_buy_intra = $objp->code_buy_intra;
|
||||||
$product_static->accountancy_code_buy_export = $objp->code_buy_export;
|
$product_static->accountancy_code_buy_export = $objp->code_buy_export;
|
||||||
|
$product_static->tva_tx = $objp->tva_tx_prod;
|
||||||
|
$product_static->tva_tx = $objp->tva_tx_prod;
|
||||||
|
|
||||||
$facture_static->ref = $objp->ref;
|
$facture_static->ref = $objp->ref;
|
||||||
$facture_static->id = $objp->facid;
|
$facture_static->id = $objp->facid;
|
||||||
$facture_static->type = $objp->ftype;
|
$facture_static->type = $objp->ftype;
|
||||||
|
$facture_static->datef = $objp->datef;
|
||||||
|
|
||||||
|
$facture_static_det->id = $objp->rowid;
|
||||||
|
$facture_static_det->total_ht = $objp->total_ht;
|
||||||
|
$facture_static_det->tva_tx = $objp->tva_tx_line;
|
||||||
|
$facture_static_det->vat_src_code = $objp->vat_src_code;
|
||||||
|
$facture_static_det->product_type = $objp->type_l;
|
||||||
|
$facture_static_det->desc = $objp->description;
|
||||||
|
|
||||||
|
$accoutinAccountArray = array(
|
||||||
|
'dom'=>$objp->aarowid,
|
||||||
|
'intra'=>$objp->aarowid_intra,
|
||||||
|
'export'=>$objp->aarowid_export,
|
||||||
|
'thirdparty' =>$objp->aarowid_thirdparty);
|
||||||
|
|
||||||
$code_sell_p_notset = '';
|
$code_sell_p_notset = '';
|
||||||
$code_sell_t_notset = '';
|
$code_sell_t_notset = '';
|
||||||
$objp->aarowid_suggest = ''; // Will be set later
|
|
||||||
|
|
||||||
$isBuyerInEEC = isInEEC($objp);
|
$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accoutinAccountArray);
|
||||||
|
if (!is_array($return) && $return<0) {
|
||||||
// Level 1: Search suggested default account for product/service
|
setEventMessage($accountingAccount->error, 'errors');
|
||||||
$suggestedaccountingaccountbydefaultfor = '';
|
|
||||||
if ($objp->type_l == 1) {
|
|
||||||
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = '';
|
|
||||||
} else {
|
} else {
|
||||||
if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with a VAT
|
$suggestedid=$return['suggestedid'];
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eecwithvat';
|
$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number
|
$code_sell_l=$return['code_sell_l'];
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : '');
|
$code_sell_p=$return['code_sell_p'];
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber';
|
$code_sell_t=$return['code_sell_t'];
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eec';
|
|
||||||
} else { // Foreign sale
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'export';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} elseif ($objp->type_l == 0) {
|
|
||||||
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = '';
|
|
||||||
} else {
|
|
||||||
if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with a VAT
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eecwithvat';
|
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber';
|
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'eec';
|
|
||||||
} else {
|
|
||||||
$objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : '');
|
|
||||||
$suggestedaccountingaccountbydefaultfor = 'export';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($objp->code_sell_l == -1) {
|
|
||||||
$objp->code_sell_l = '';
|
|
||||||
}
|
}
|
||||||
|
//var_dump($return);
|
||||||
|
|
||||||
// Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding)
|
if (!empty($code_sell_p)) {
|
||||||
$suggestedaccountingaccountfor = '';
|
|
||||||
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
|
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
|
||||||
$suggestedaccountingaccountfor = '';
|
|
||||||
} else {
|
|
||||||
if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with VAT
|
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
|
||||||
$suggestedaccountingaccountfor = 'eecwithvat';
|
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number
|
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ?
|
|
||||||
$suggestedaccountingaccountfor = 'eecwithoutvatnumber';
|
|
||||||
} elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
|
|
||||||
$objp->code_sell_p = $objp->code_sell_intra;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid_intra;
|
|
||||||
$suggestedaccountingaccountfor = 'eec';
|
|
||||||
} else { // Foreign sale
|
|
||||||
$objp->code_sell_p = $objp->code_sell_export;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid_export;
|
|
||||||
$suggestedaccountingaccountfor = 'export';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
|
||||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
|
||||||
if (!empty($objp->company_code_sell)) {
|
|
||||||
$objp->code_sell_t = $objp->company_code_sell;
|
|
||||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
|
||||||
$suggestedaccountingaccountfor = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Manage Deposit
|
|
||||||
if ($objp->description == "(DEPOSIT)") {
|
|
||||||
$accountdeposittoventilated = new AccountingAccount($db);
|
|
||||||
$accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
|
||||||
$objp->code_sell_l = $accountdeposittoventilated->ref;
|
|
||||||
$objp->aarowid_suggest = $accountdeposittoventilated->rowid;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($objp->code_sell_p)) {
|
|
||||||
// Value was defined previously
|
// Value was defined previously
|
||||||
} else {
|
} else {
|
||||||
$code_sell_p_notset = 'color:orange';
|
$code_sell_p_notset = 'color:orange';
|
||||||
}
|
}
|
||||||
if (empty($objp->code_sell_l) && empty($objp->code_sell_p)) {
|
if (empty($code_sell_l) && empty($code_sell_p)) {
|
||||||
$code_sell_p_notset = 'color:red';
|
$code_sell_p_notset = 'color:red';
|
||||||
}
|
}
|
||||||
if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber' && empty($code_sell_p_notset)) {
|
if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber' && empty($code_sell_p_notset)) {
|
||||||
$code_sell_p_notset = 'color:orange';
|
$code_sell_p_notset = 'color:orange';
|
||||||
}
|
}
|
||||||
|
|
||||||
// $objp->code_sell_l is now default code of product/service
|
// $code_sell_l is now default code of product/service
|
||||||
// $objp->code_sell_p is now code of product/service
|
// $code_sell_p is now code of product/service
|
||||||
// $objp->code_sell_t is now code of thirdparty
|
// $code_sell_t is now code of thirdparty
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Line id
|
// Line id
|
||||||
print '<td>'.$objp->rowid.'</td>';
|
print '<td>'.$facture_static_det->id.'</td>';
|
||||||
|
|
||||||
// Ref Invoice
|
// Ref Invoice
|
||||||
print '<td class="nowraponall">'.$facture_static->getNomUrl(1).'</td>';
|
print '<td class="nowraponall">'.$facture_static->getNomUrl(1).'</td>';
|
||||||
|
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($facture_static->datef), 'day').'</td>';
|
||||||
|
|
||||||
// Ref Product
|
// Ref Product
|
||||||
print '<td class="tdoverflowmax150">';
|
print '<td class="tdoverflowmax150">';
|
||||||
if ($product_static->id > 0) {
|
if ($product_static->id > 0) {
|
||||||
print $product_static->getNomUrl(1);
|
print $product_static->getNomUrl(1);
|
||||||
}
|
}
|
||||||
if ($objp->product_label) {
|
if ($product_static->label) {
|
||||||
print '<br><span class="opacitymedium small">'.$objp->product_label.'</span>';
|
print '<br><span class="opacitymedium small">'.$product_static->label.'</span>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="tdoverflowonsmartphone small">';
|
print '<td class="tdoverflowonsmartphone small">';
|
||||||
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
|
$text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc));
|
||||||
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
|
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
|
||||||
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description);
|
print $form->textwithtooltip(dol_trunc($text, $trunclength), $facture_static_det->desc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="right nowraponall amount">';
|
print '<td class="right nowraponall amount">';
|
||||||
@ -692,11 +634,12 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Vat rate
|
// Vat rate
|
||||||
if ($objp->vat_tx_l != $objp->vat_tx_p) {
|
$code_vat_differ='';
|
||||||
|
if ($product_static->tva_tx !== $facture_static_det->tva_tx) {
|
||||||
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
|
||||||
}
|
}
|
||||||
print '<td style="'.$code_vat_differ.'" class="right">';
|
print '<td style="'.$code_vat_differ.'" class="right">';
|
||||||
print vatrate($objp->tva_tx_line.($objp->vat_src_code ? ' ('.$objp->vat_src_code.')' : ''));
|
print vatrate($facture_static_det->tva_tx.($facture_static_det->vat_src_code ? ' ('.$facture_static_det->vat_src_code.')' : ''));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
@ -713,18 +656,18 @@ if ($result) {
|
|||||||
|
|
||||||
// Found accounts
|
// Found accounts
|
||||||
print '<td class="small">';
|
print '<td class="small">';
|
||||||
$s = '1. '.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
|
$s = '1. '.(($facture_static_det->product_type == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
|
||||||
$shelp = '';
|
$shelp = '';
|
||||||
if ($suggestedaccountingaccountbydefaultfor == 'eec') {
|
if ($suggestedaccountingaccountbydefaultfor == 'eec') {
|
||||||
$shelp .= $langs->trans("SaleEEC");
|
$shelp .= $langs->trans("SaleEEC");
|
||||||
} elseif ($suggestedaccountingaccountbydefaultfor == 'export') {
|
} elseif ($suggestedaccountingaccountbydefaultfor == 'export') {
|
||||||
$shelp .= $langs->trans("SaleExport");
|
$shelp .= $langs->trans("SaleExport");
|
||||||
}
|
}
|
||||||
$s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>');
|
$s .= ($code_sell_l > 0 ? length_accountg($code_sell_l) : '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>');
|
||||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
if ($objp->product_id > 0) {
|
if ($product_static->id > 0) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$s = '2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': ';
|
$s = '2. '.(($facture_static_det->product_type == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': ';
|
||||||
$shelp = ''; $ttype = 'help';
|
$shelp = ''; $ttype = 'help';
|
||||||
if ($suggestedaccountingaccountfor == 'eec') {
|
if ($suggestedaccountingaccountfor == 'eec') {
|
||||||
$shelp = $langs->trans("SaleEEC");
|
$shelp = $langs->trans("SaleEEC");
|
||||||
@ -736,7 +679,7 @@ if ($result) {
|
|||||||
} elseif ($suggestedaccountingaccountfor == 'export') {
|
} elseif ($suggestedaccountingaccountfor == 'export') {
|
||||||
$shelp = $langs->trans("SaleExport");
|
$shelp = $langs->trans("SaleExport");
|
||||||
}
|
}
|
||||||
$s .= (empty($objp->code_sell_p) ? '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>' : length_accountg($objp->code_sell_p));
|
$s .= (empty($code_sell_p) ? '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>' : length_accountg($code_sell_p));
|
||||||
print $form->textwithpicto($s, $shelp, 1, $ttype, '', 0, 2, '', 1);
|
print $form->textwithpicto($s, $shelp, 1, $ttype, '', 0, 2, '', 1);
|
||||||
} else {
|
} else {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -747,38 +690,26 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
|
$s = '3. '.(($facture_static_det->product_type == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
|
||||||
$shelp = '';
|
$shelp = '';
|
||||||
$s .= ($objp->code_sell_t > 0 ? length_accountg($objp->code_sell_t) : '<span style="'.$code_sell_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
$s .= ($code_sell_t > 0 ? length_accountg($code_sell_t) : '<span style="'.$code_sell_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
||||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Suggested accounting account
|
// Suggested accounting account
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$suggestedid = $objp->aarowid_suggest;
|
print $formaccounting->select_account($suggestedid, 'codeventil'.$facture_static_det->id, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||||
if (empty($suggestedid) && empty($objp->code_sell_p) && !empty($objp->code_sell_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) {
|
|
||||||
if (empty($accountingaccount_codetotid_cache[$objp->code_sell_l])) {
|
|
||||||
$tmpaccount = new AccountingAccount($db);
|
|
||||||
$tmpaccount->fetch(0, $objp->code_sell_l, 1);
|
|
||||||
if ($tmpaccount->id > 0) {
|
|
||||||
$suggestedid = $tmpaccount->id;
|
|
||||||
}
|
|
||||||
$accountingaccount_codetotid_cache[$objp->code_sell_l] = $tmpaccount->id;
|
|
||||||
} else {
|
|
||||||
$suggestedid = $accountingaccount_codetotid_cache[$objp->code_sell_l];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Column with checkbox
|
// Column with checkbox
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
$ischecked = $objp->aarowid_suggest;
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||||
if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
$ischecked=1;
|
||||||
|
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
||||||
$ischecked = 0;
|
$ischecked = 0;
|
||||||
}
|
}
|
||||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="'.$objp->rowid."_".$i.'"'.($ischecked ? "checked" : "").'/>';
|
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facture_static_det->id.'" name="toselect[]" value="'.$facture_static_det->id."_".$i.'"'.($ischecked ? "checked" : "").'/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -362,7 +362,7 @@ if ($result) {
|
|||||||
|
|
||||||
// Retrieve the accounting code of the social contribution of the payment from link of payment.
|
// Retrieve the accounting code of the social contribution of the payment from link of payment.
|
||||||
// Note: We have the social contribution id, it can be faster to get accounting code from social contribution id.
|
// Note: We have the social contribution id, it can be faster to get accounting code from social contribution id.
|
||||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
$sqlmid = "SELECT cchgsoc.accountancy_code";
|
||||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."c_chargesociales cchgsoc";
|
$sqlmid .= " FROM ".MAIN_DB_PREFIX."c_chargesociales cchgsoc";
|
||||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."chargesociales as chgsoc ON chgsoc.fk_type = cchgsoc.id";
|
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."chargesociales as chgsoc ON chgsoc.fk_type = cchgsoc.id";
|
||||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as paycharg ON paycharg.fk_charge = chgsoc.rowid";
|
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as paycharg ON paycharg.fk_charge = chgsoc.rowid";
|
||||||
@ -1019,7 +1019,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
|
|
||||||
// Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed)
|
// Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed)
|
||||||
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE entity = '.$conf->entity.' AND fk_accountancy_journal IS NULL AND clos=0';
|
$sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."bank_account WHERE entity = ".((int) $conf->entity)." AND fk_accountancy_journal IS NULL AND clos=0";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|||||||
@ -369,9 +369,9 @@ if ($result) {
|
|||||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>';
|
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>';
|
||||||
|
|
||||||
print '<br><div class="inline-block divButAction">'.$langs->trans("ChangeAccount").'<br>';
|
print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
|
||||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||||
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
print '<input type="submit" class="button small valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,12 @@ header('Content-Type: text/csv');
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
|
|
||||||
if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_FEC && $type_export == "general_ledger") { // Specific filename for FEC model export into the general ledger
|
// Specific filename for FEC model export into the general ledger
|
||||||
|
if (($accountancyexport->getFormatCode($formatexportset) == 'fec' || $accountancyexport->getFormatCode($formatexportset) == 'fec2')
|
||||||
|
&& $type_export == "general_ledger") {
|
||||||
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
|
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
|
||||||
if (empty($search_date_end)) {
|
if (empty($search_date_end)) {
|
||||||
// TODO Get the max date into bookeeping table
|
// TODO Get the max date into bookkeeping table
|
||||||
$search_date_end = dol_now();
|
$search_date_end = dol_now();
|
||||||
}
|
}
|
||||||
$datetouseforfilename = $search_date_end;
|
$datetouseforfilename = $search_date_end;
|
||||||
@ -58,7 +60,7 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
|
|||||||
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
|
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
|
||||||
|
|
||||||
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
|
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
|
||||||
} elseif ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_CIEL && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
|
} elseif ($accountancyexport->getFormatCode($formatexportset) == 'ciel' && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
|
||||||
$completefilename = "XIMPORT.TXT";
|
$completefilename = "XIMPORT.TXT";
|
||||||
} else {
|
} else {
|
||||||
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
|
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
|
||||||
|
|||||||
@ -404,13 +404,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&token='.newToken().'&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&token='.newToken().'&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->MEMBER_ADDON_PDF == $name) {
|
if ($conf->global->MEMBER_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -125,15 +125,15 @@ if (empty($user->socid)) {
|
|||||||
echo '<div class="tabsAction">';
|
echo '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->rights->adherent->creer) {
|
||||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
if (!$this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
||||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
echo '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
echo '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div><br>';
|
echo '</div><br>';
|
||||||
|
|||||||
@ -1839,7 +1839,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login Dolibarr
|
// Login Dolibarr - Link to user
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$editenable = $user->rights->adherent->creer && $user->rights->user->user->creer;
|
$editenable = $user->rights->adherent->creer && $user->rights->user->user->creer;
|
||||||
print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
|
print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
|
||||||
@ -1907,7 +1907,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Modify
|
// Modify
|
||||||
if (!empty($user->rights->adherent->creer)) {
|
if (!empty($user->rights->adherent->creer)) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
|
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
|
||||||
}
|
}
|
||||||
@ -1979,10 +1979,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$isinspip = $mailmanspip->is_in_spip($object);
|
$isinspip = $mailmanspip->is_in_spip($object);
|
||||||
|
|
||||||
if ($isinspip == 1) {
|
if ($isinspip == 1) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=del_spip">'.$langs->trans("DeleteIntoSpip").'</a>'."\n";
|
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=del_spip&token='.newToken().'">'.$langs->trans("DeleteIntoSpip").'</a>'."\n";
|
||||||
}
|
}
|
||||||
if ($isinspip == 0) {
|
if ($isinspip == 0) {
|
||||||
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=add_spip">'.$langs->trans("AddIntoSpip").'</a>'."\n";
|
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=add_spip&token='.newToken().'">'.$langs->trans("AddIntoSpip").'</a>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2053,7 +2053,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
// List of actions on element
|
// List of actions on element
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||||
$formactions = new FormActions($db);
|
$formactions = new FormActions($db);
|
||||||
$somethingshown = $formactions->showactions($object, 'member', $socid, 1, 'listactions', $MAX, '', $morehtmlright);
|
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlright);
|
||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -587,7 +587,7 @@ if ($rowid > 0) {
|
|||||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) {
|
if ($action != 'editthirdparty' && $user->rights->adherent->creer) {
|
||||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="2" class="valeur">';
|
print '</td><td colspan="2" class="valeur">';
|
||||||
@ -623,7 +623,7 @@ if ($rowid > 0) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login Dolibarr
|
// Login Dolibarr - Link to user
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans("LinkedToDolibarrUser");
|
print $langs->trans("LinkedToDolibarrUser");
|
||||||
@ -631,7 +631,7 @@ if ($rowid > 0) {
|
|||||||
if ($action != 'editlogin' && $user->rights->adherent->creer) {
|
if ($action != 'editlogin' && $user->rights->adherent->creer) {
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($user->rights->user->user->creer) {
|
if ($user->rights->user->user->creer) {
|
||||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -641,7 +641,9 @@ if ($rowid > 0) {
|
|||||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', '');
|
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', '');
|
||||||
} else {
|
} else {
|
||||||
if ($object->user_id) {
|
if ($object->user_id) {
|
||||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
|
$linkeduser = new User($db);
|
||||||
|
$linkeduser->fetch($object->user_id);
|
||||||
|
print $linkeduser->getNomUrl(-1);
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("NoDolibarrAccess").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("NoDolibarrAccess").'</span>';
|
||||||
}
|
}
|
||||||
@ -668,7 +670,7 @@ if ($rowid > 0) {
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($object->statut > 0) {
|
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 {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -394,7 +394,7 @@ if ($rowid && $action != 'edit') {
|
|||||||
/*
|
/*
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||||
$formactions = new FormActions($db);
|
$formactions = new FormActions($db);
|
||||||
$somethingshown = $formactions->showactions($object, 'invoice', $socid, 1);
|
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|||||||
@ -45,7 +45,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||||||
}
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td class="right"></td>';
|
echo '<td class="right"></td>';
|
||||||
echo '<td class="right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
echo '<td class="right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&token='.newToken().'&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -318,6 +318,19 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$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 "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
@ -481,12 +494,12 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
if ($user->rights->adherent->configurer) {
|
if ($user->rights->adherent->configurer) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&rowid='.$object->id.'">'.$langs->trans("Modify").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&rowid='.$object->id.'">'.$langs->trans("Modify").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
if ($user->rights->adherent->configurer && !empty($object->status)) {
|
if ($user->rights->adherent->configurer && !empty($object->status)) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&token='.newToken().'&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>';
|
||||||
}
|
}
|
||||||
@ -728,10 +741,10 @@ if ($rowid > 0) {
|
|||||||
// Actions
|
// Actions
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->rights->adherent->creer) {
|
||||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
print '<a class="marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=resign">'.img_picto($langs->trans("Resiliate"), 'disable.png').'</a>';
|
print '<a class="marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=resign&token='.newToken().'">'.img_picto($langs->trans("Resiliate"), 'disable.png').'</a>';
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
|||||||
@ -185,9 +185,9 @@ print "\n<div class=\"tabsAction\">\n";
|
|||||||
|
|
||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=create&rowid='.$object->id.'">'.$langs->trans("Add").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=create&token='.newToken().'&rowid='.$object->id.'">'.$langs->trans("Add").'</a>';
|
||||||
if ($cnt_trans > 0) {
|
if ($cnt_trans > 0) {
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=edit&rowid='.$object->id.'">'.$langs->trans("Update").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/type_translation.php?action=edit&token='.newToken().'&rowid='.$object->id.'">'.$langs->trans("Update").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -282,9 +282,9 @@ while ($i <= $MAXAGENDA) {
|
|||||||
print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key);
|
print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key);
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->{$default})) {
|
if (empty($conf->global->{$default})) {
|
||||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -260,7 +260,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") {
|
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
} else {
|
} else {
|
||||||
@ -269,7 +269,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
|
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -324,9 +324,9 @@ print '<td class="center"> </td>'."\n";
|
|||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
|
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
|
||||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
|
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -174,14 +174,14 @@ if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
||||||
}
|
}
|
||||||
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
} else {
|
} else {
|
||||||
if (!isHTTPS()) {
|
if (!isHTTPS()) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
||||||
}
|
}
|
||||||
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
@ -190,9 +190,9 @@ if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
|||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
@ -221,7 +221,7 @@ if (empty($conf->cron->enabled)) {
|
|||||||
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
// Get the max frequency of reminder
|
// Get the max frequency of reminder
|
||||||
if ($job->id > 0) {
|
if ($job->id > 0) {
|
||||||
@ -229,7 +229,7 @@ if (empty($conf->cron->enabled)) {
|
|||||||
$langs->load("cron");
|
$langs->load("cron");
|
||||||
print '<span class="opacitymedium warning">'.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).'</span>';
|
print '<span class="opacitymedium warning">'.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).'</span>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_EMAIL&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -258,7 +258,7 @@ while ($i < $nbofbank) {
|
|||||||
print img_picto($langs->trans("Activated"), 'on');
|
print img_picto($langs->trans("Activated"), 'on');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.$i.'">';
|
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.$i.'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'off');
|
print img_picto($langs->trans("Disabled"), 'off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
@ -354,13 +354,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&token='.newToken().'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&token='.newToken().'&can_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->BANKADDON_PDF == $name) {
|
if ($conf->global->BANKADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -428,13 +428,13 @@ print "</td>";
|
|||||||
// Active
|
// Active
|
||||||
if ($conf->global->BANK_COLORIZE_MOVEMENT) {
|
if ($conf->global->BANK_COLORIZE_MOVEMENT) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -373,12 +373,12 @@ if ($conf->product->enabled) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
||||||
|
|
||||||
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") {
|
if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM) && $conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") {
|
||||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&value='.urlencode($file).'">';
|
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&token='.newToken().'&value='.urlencode($file).'">';
|
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -235,7 +235,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->BOM_ADDON == $file) {
|
if ($conf->global->BOM_ADDON == $file) {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -362,13 +362,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->BOM_ADDON_PDF == $name) {
|
if ($conf->global->BOM_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -360,7 +360,7 @@ foreach ($boxtoadd as $box) {
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
if (!count($boxtoadd) && count($boxactivated)) {
|
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 '</table>'."\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -423,8 +423,8 @@ foreach ($boxactivated as $key => $box) {
|
|||||||
$hasprevious = ($key != 0);
|
$hasprevious = ($key != 0);
|
||||||
print '<td class="center">'.($key + 1).'</td>';
|
print '<td class="center">'.($key + 1).'</td>';
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall">';
|
||||||
print ($hasnext ? '<a class="reposition" href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key + 1]->rowid.'">'.img_down().'</a> ' : '');
|
print ($hasnext ? '<a class="reposition" href="boxes.php?action=switch&token='.newToken().'&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key + 1]->rowid.'">'.img_down().'</a> ' : '');
|
||||||
print ($hasprevious ? '<a class="reposition" href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key - 1]->rowid.'">'.img_up().'</a>' : '');
|
print ($hasprevious ? '<a class="reposition" href="boxes.php?action=switch&token='.newToken().'&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key - 1]->rowid.'">'.img_up().'</a>' : '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<a class="reposition" href="boxes.php?rowid='.$box->rowid.'&action=delete&token='.newToken().'">'.img_delete().'</a>';
|
print '<a class="reposition" href="boxes.php?rowid='.$box->rowid.'&action=delete&token='.newToken().'">'.img_delete().'</a>';
|
||||||
|
|||||||
@ -299,7 +299,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->COMMANDE_ADDON == $file) {
|
if ($conf->global->COMMANDE_ADDON == $file) {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -424,13 +424,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->COMMANDE_ADDON_PDF == $name) {
|
if ($conf->global->COMMANDE_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -655,10 +655,10 @@ print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
|||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&token='.newToken().'&value=0">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&token='.newToken().'&value=0">';
|
||||||
print img_picto($langs->trans("Activated"),'switch_on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&token='.newToken().'&value=1">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&token='.newToken().'&value=1">';
|
||||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
}
|
}
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
@ -676,9 +676,9 @@ if ($conf->banque->enabled) {
|
|||||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
|
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) {
|
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -696,9 +696,9 @@ if ($conf->stock->enabled) {
|
|||||||
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
|
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -230,7 +230,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->CONTRACT_ADDON == "$file") {
|
if ($conf->global->CONTRACT_ADDON == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -353,13 +353,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->CONTRACT_ADDON_PDF == $name) {
|
if ($conf->global->CONTRACT_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ if ($action == 'edit') {
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ print '<input type="hidden" name="action" value="set">';
|
|||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||||
print '<td class="right"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
print '<td class="right"><input type="submit" class="button button-edit" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_LOGS_LINES_NUMBER").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_LOGS_LINES_NUMBER").'</td>';
|
||||||
|
|||||||
@ -206,12 +206,12 @@ $param = '&mode='.$mode;
|
|||||||
$enabledisablehtml = $langs->trans("EnableDefaultValues").' ';
|
$enabledisablehtml = $langs->trans("EnableDefaultValues").' ';
|
||||||
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) {
|
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) {
|
||||||
// Button off, click to enable
|
// Button off, click to enable
|
||||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&token='.newToken().'&value=1'.$param.'">';
|
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&token='.newToken().'&value=1'.$param.'">';
|
||||||
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
|
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
$enabledisablehtml .= '</a>';
|
$enabledisablehtml .= '</a>';
|
||||||
} else {
|
} else {
|
||||||
// Button on, click to disable
|
// Button on, click to disable
|
||||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&token='.newToken().'&value=0'.$param.'">';
|
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&token='.newToken().'&value=0'.$param.'">';
|
||||||
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
|
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
$enabledisablehtml .= '</a>';
|
$enabledisablehtml .= '</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -452,7 +452,7 @@ if ($action == 'edit') {
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print '<br><div class="tabsAction">';
|
print '<br><div class="tabsAction">';
|
||||||
print '<a class="butAction" href="delais.php?action=edit">'.$langs->trans("Modify").'</a></div>';
|
print '<a class="butAction" href="delais.php?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -235,7 +235,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") {
|
if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -357,13 +357,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->DELIVERY_ADDON_PDF == "$name") {
|
if ($conf->global->DELIVERY_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -1175,6 +1175,8 @@ if ($id) {
|
|||||||
$sql .= natural_search("r.code_region", $search_code);
|
$sql .= natural_search("r.code_region", $search_code);
|
||||||
} elseif ($search_code != '' && $id == 7) {
|
} elseif ($search_code != '' && $id == 7) {
|
||||||
$sql .= natural_search("a.code", $search_code);
|
$sql .= natural_search("a.code", $search_code);
|
||||||
|
} elseif ($search_code != '' && $id == 10) {
|
||||||
|
$sql .= natural_search("t.code", $search_code);
|
||||||
} elseif ($search_code != '' && $id != 9) {
|
} elseif ($search_code != '' && $id != 9) {
|
||||||
$sql .= natural_search("code", $search_code);
|
$sql .= natural_search("code", $search_code);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -232,7 +232,7 @@ class PrestaShopWebservice
|
|||||||
if ($response != '') {
|
if ($response != '') {
|
||||||
libxml_clear_errors();
|
libxml_clear_errors();
|
||||||
libxml_use_internal_errors(true);
|
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()) {
|
if (libxml_get_errors()) {
|
||||||
$msg = var_export(libxml_get_errors(), true);
|
$msg = var_export(libxml_get_errors(), true);
|
||||||
libxml_clear_errors();
|
libxml_clear_errors();
|
||||||
|
|||||||
@ -93,9 +93,9 @@ if ($conf->use_javascript_ajax) {
|
|||||||
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');
|
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
if (empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
} elseif (!empty($conf->global->USER_MAIL_REQUIRED)) {
|
} elseif (!empty($conf->global->USER_MAIL_REQUIRED)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -356,7 +356,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
$linkback = '<a href="'.dol_buildpath('/admin/emailcollector_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/emailcollector_list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
/*
|
/*
|
||||||
@ -374,7 +374,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify')
|
||||||
{
|
{
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token='.newToken().'&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
@ -656,7 +656,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Delete
|
// Delete
|
||||||
print '<td class="right nowraponall">';
|
print '<td class="right nowraponall">';
|
||||||
print '<a class="editfielda marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
print '<a class="editfielda marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&token='.newToken().'&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&token='.newToken().'&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
|
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&token='.newToken().'&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -693,14 +693,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Edit
|
// Edit
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Edit").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Edit").'</a></div>';
|
||||||
|
|
||||||
// Clone
|
// Clone
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=order">'.$langs->trans("ToClone").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object=order">'.$langs->trans("ToClone").'</a></div>';
|
||||||
|
|
||||||
// Collect now
|
// Collect now
|
||||||
if (count($object->actions) > 0) {
|
if (count($object->actions) > 0) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=collect">'.$langs->trans("CollectNow").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=collect&token='.newToken().'">'.$langs->trans("CollectNow").'</a></div>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoOperations")).'">'.$langs->trans("CollectNow").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoOperations")).'">'.$langs->trans("CollectNow").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -376,7 +376,7 @@ if ($action == 'edit') {
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
print '<br>'.$langs->trans("NothingToSetup");
|
print '<br>'.$langs->trans("NothingToSetup");
|
||||||
@ -580,13 +580,13 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/eventorganization_extrafields.php
|
* \file htdocs/admin/eventorganization_confbooth_extrafields.php
|
||||||
* \ingroup bom
|
* \ingroup bom
|
||||||
* \brief Page to setup extra fields of EventOrganization
|
* \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
|
* \ingroup eventorganization
|
||||||
* \brief Page to setup extra fields of conferenceorboothattendee
|
* \brief Page to setup extra fields of conferenceorboothattendee
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -229,7 +229,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") {
|
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -353,13 +353,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->EXPEDITION_ADDON_PDF == $name) {
|
if ($conf->global->EXPEDITION_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,13 @@ if ($action == 'updateMask') {
|
|||||||
$draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha');
|
$draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha');
|
||||||
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
if (!$res1 > 0 || !$res2 > 0) {
|
$dates = GETPOST('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', 'int');
|
||||||
|
$res3 = 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');
|
||||||
|
$res4 = 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)) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +244,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->EXPENSEREPORT_ADDON == $file) {
|
if ($conf->global->EXPENSEREPORT_ADDON == $file) {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -358,13 +364,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +379,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") {
|
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -458,6 +464,18 @@ 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 '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.$conf->global->EXPENSEREPORT_DRAFT_WATERMARK.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
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 '</table>';
|
||||||
|
|
||||||
print $form->buttonsSaveCancel("Save", '');
|
print $form->buttonsSaveCancel("Save", '');
|
||||||
|
|||||||
@ -33,10 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php'
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin", "trips", "errors", "other", "dict"));
|
$langs->loadLangs(array("admin", "trips", "errors", "other", "dict"));
|
||||||
|
|
||||||
if (!$user->admin) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
@ -45,10 +41,20 @@ $ikoffset = GETPOST('ikoffset', 'int');
|
|||||||
$coef = GETPOST('coef', 'int');
|
$coef = GETPOST('coef', 'int');
|
||||||
|
|
||||||
$fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat');
|
$fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat');
|
||||||
$fk_range = GETPOST('fk_range');
|
$fk_range = GETPOST('fk_range', 'int');
|
||||||
|
|
||||||
|
$expIk = new ExpenseReportIk($db);
|
||||||
|
|
||||||
|
if (!$user->admin) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if ($action == 'updateik') {
|
if ($action == 'updateik') {
|
||||||
$expIk = new ExpenseReportIk($db);
|
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$result = $expIk->fetch($id);
|
$result = $expIk->fetch($id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -61,13 +67,13 @@ if ($action == 'updateik') {
|
|||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
setEventMessages('SetupSaved', null, 'mesgs');
|
setEventMessages('SetupSaved', null, 'mesgs');
|
||||||
|
|
||||||
header('Location: '.$_SERVER['PHP_SELF']);
|
header('Location: '.$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($expIk->error, $expIk->errors, 'errors');
|
setEventMessages($expIk->error, $expIk->errors, 'errors');
|
||||||
}
|
}
|
||||||
} elseif ($action == 'delete') { // TODO add confirm
|
} elseif ($action == 'delete') { // TODO add confirm
|
||||||
$expIk = new ExpenseReportIk($db);
|
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$result = $expIk->fetch($id);
|
$result = $expIk->fetch($id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -77,12 +83,11 @@ if ($action == 'updateik') {
|
|||||||
$expIk->delete($user);
|
$expIk->delete($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
header('Location: '.$_SERVER['PHP_SELF']);
|
header('Location: '.$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rangesbycateg = ExpenseReportIk::getAllRanges();
|
$rangesbycateg = $expIk->getAllRanges();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -102,7 +107,8 @@ print dol_get_fiche_head($head, 'expenseik', $langs->trans("ExpenseReportsIk"),
|
|||||||
echo '<span class="opacitymedium">'.$langs->trans('ExpenseReportIkDesc').'</span>';
|
echo '<span class="opacitymedium">'.$langs->trans('ExpenseReportIkDesc').'</span>';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">';
|
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||||
|
echo '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||||
|
|
||||||
if ($action == 'edit') {
|
if ($action == 'edit') {
|
||||||
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
||||||
@ -111,8 +117,6 @@ if ($action == 'edit') {
|
|||||||
echo '<input type="hidden" name="action" value="updateik" />';
|
echo '<input type="hidden" name="action" value="updateik" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<input type="hidden" name="token" value="'.newToken().'" />';
|
|
||||||
|
|
||||||
echo '<table class="noborder centpercent">';
|
echo '<table class="noborder centpercent">';
|
||||||
|
|
||||||
foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) {
|
foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) {
|
||||||
|
|||||||
@ -54,7 +54,6 @@ $code_expense_rules_type = GETPOST('code_expense_rules_type');
|
|||||||
$dates = dol_mktime(12, 0, 0, GETPOST('startmonth'), GETPOST('startday'), GETPOST('startyear'));
|
$dates = dol_mktime(12, 0, 0, GETPOST('startmonth'), GETPOST('startday'), GETPOST('startyear'));
|
||||||
$datee = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
$datee = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
||||||
$amount = GETPOST('amount');
|
$amount = GETPOST('amount');
|
||||||
$restrictive = GETPOST('restrictive');
|
|
||||||
|
|
||||||
$object = new ExpenseReportRule($db);
|
$object = new ExpenseReportRule($db);
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
@ -138,7 +137,7 @@ if ($action == 'save') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules = ExpenseReportRule::getAllRule();
|
$rules = $object->getAllRule();
|
||||||
|
|
||||||
$tab_apply = array(
|
$tab_apply = array(
|
||||||
'A' => $langs->trans('All'),
|
'A' => $langs->trans('All'),
|
||||||
@ -319,7 +318,7 @@ foreach ($rules as $rule) {
|
|||||||
echo '<a class="editfielda paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$rule->id.'">'.img_edit().'</a> ';
|
echo '<a class="editfielda paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$rule->id.'">'.img_edit().'</a> ';
|
||||||
echo '<a class="paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$rule->id.'">'.img_delete().'</a>';
|
echo '<a class="paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$rule->id.'">'.img_delete().'</a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<input type="submit" class="button" value="'.$langs->trans('Update').'" /> ';
|
echo '<input type="submit" class="button button-edit" value="'.$langs->trans('Update').'" /> ';
|
||||||
echo '<a href="'.$_SERVER['PHP_SELF'].'" class="button button-cancel">'.$langs->trans("Cancel").'</a>';
|
echo '<a href="'.$_SERVER['PHP_SELF'].'" class="button button-cancel">'.$langs->trans("Cancel").'</a>';
|
||||||
}
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|||||||
@ -501,13 +501,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("SetAsDefault"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("SetAsDefault"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->FACTURE_ADDON_PDF == "$name") {
|
if ($conf->global->FACTURE_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -294,7 +294,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->FICHEINTER_ADDON == $classname) {
|
if ($conf->global->FICHEINTER_ADDON == $classname) {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($classname).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -419,13 +419,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,7 +434,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->FICHEINTER_ADDON_PDF == "$name") {
|
if ($conf->global->FICHEINTER_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -230,7 +230,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->HOLIDAY_ADDON == "$file") {
|
if ($conf->global->HOLIDAY_ADDON == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -359,13 +359,13 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
if ($conf->global->HOLIDAY_ADDON_PDF == $name) {
|
if ($conf->global->HOLIDAY_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -466,9 +466,9 @@ if ($conf->use_javascript_ajax) {
|
|||||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY', array(), null, 0);
|
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY', array(), null, 0);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY)) {
|
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -482,9 +482,9 @@ if ($conf->use_javascript_ajax) {
|
|||||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY', array(), null, 0);
|
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY', array(), null, 0);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY)) {
|
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -498,9 +498,9 @@ if ($conf->use_javascript_ajax) {
|
|||||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
|
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -514,9 +514,9 @@ if ($conf->use_javascript_ajax) {
|
|||||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
|
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&token='.newToken().'&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
@ -82,7 +82,7 @@ print '<br><br>';
|
|||||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
|
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
|
||||||
$setupcompanynotcomplete = 1;
|
$setupcompanynotcomplete = 1;
|
||||||
}
|
}
|
||||||
print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit&token='.newToken()), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
||||||
print '<br><br>'.$langs->trans("SetupDescription3b");
|
print '<br><br>'.$langs->trans("SetupDescription3b");
|
||||||
if (!empty($setupcompanynotcomplete)) {
|
if (!empty($setupcompanynotcomplete)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file knowledgemanagement/admin/setup.php
|
* \file htdocs/admin/knowledgemanagement.php
|
||||||
* \ingroup knowledgemanagement
|
* \ingroup knowledgemanagement
|
||||||
* \brief KnowledgeManagement setup page.
|
* \brief KnowledgeManagement setup page.
|
||||||
*/
|
*/
|
||||||
@ -65,9 +65,7 @@ if (!$user->admin) {
|
|||||||
* Actions
|
* 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') {
|
if ($action == 'updateMask') {
|
||||||
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
||||||
@ -324,7 +322,7 @@ if ($action == 'edit') {
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
//print '<br>'.$langs->trans("NothingToSetup");
|
//print '<br>'.$langs->trans("NothingToSetup");
|
||||||
@ -533,13 +531,13 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -131,7 +131,7 @@ if (!function_exists("ldap_connect")) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"), -1);
|
print dol_get_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"), -1);
|
||||||
|
|||||||
@ -145,7 +145,7 @@ print dol_get_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"), -1);
|
|||||||
print $langs->trans("LDAPDescContact").'<br>';
|
print $langs->trans("LDAPDescContact").'<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|||||||
@ -120,7 +120,7 @@ print $langs->trans("LDAPDescGroups").'<br>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|||||||
@ -184,7 +184,7 @@ if (!function_exists("ldap_connect")) {
|
|||||||
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1);
|
print dol_get_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1);
|
||||||
|
|||||||
@ -112,7 +112,7 @@ print $langs->trans("LDAPDescMembersTypes").'<br>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|||||||
@ -173,7 +173,7 @@ if (!function_exists("ldap_connect")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -190,7 +190,7 @@ if ($action == 'edit') {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit'.(!empty($currencycode) ? '¤cycode='.$currencycode : '').'">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().''.(!empty($currencycode) ? '¤cycode='.$currencycode : '').'">'.$langs->trans("Modify").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -784,7 +784,7 @@ if ($action == 'edit') {
|
|||||||
// Actions button
|
// Actions button
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
|
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) {
|
if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) {
|
||||||
|
|||||||
@ -515,7 +515,7 @@ if ($action == 'edit') {
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {
|
if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) {
|
if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) {
|
||||||
|
|||||||
@ -632,7 +632,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
if ($sortorder) {
|
if ($sortorder) {
|
||||||
$url .= '&page='.urlencode($sortorder);
|
$url .= '&page='.urlencode($sortorder);
|
||||||
}
|
}
|
||||||
print '<a class="editfielda reposition marginrightonly marginleftonly" href="'.$url.'&action=edit&rowid='.$obj->rowid.'">'.img_edit().'</a>';
|
print '<a class="editfielda reposition marginrightonly marginleftonly" href="'.$url.'&action=edit&token='.newToken().'&rowid='.$obj->rowid.'">'.img_edit().'</a>';
|
||||||
//print ' ';
|
//print ' ';
|
||||||
print '<a class=" marginrightonly marginleftonly" href="'.$url.'&action=delete&token='.newToken().'">'.img_delete().'</a> ';
|
print '<a class=" marginrightonly marginleftonly" href="'.$url.'&action=delete&token='.newToken().'">'.img_delete().'</a> ';
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
|||||||
@ -160,6 +160,7 @@ if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) {
|
|||||||
|
|
||||||
$tabhelp = array();
|
$tabhelp = array();
|
||||||
$tabhelp[25] = array(
|
$tabhelp[25] = array(
|
||||||
|
'label'=>$langs->trans('EnterAnyCode'),
|
||||||
'topic'=>'<span class="small">'.$helpsubstit.'</span>',
|
'topic'=>'<span class="small">'.$helpsubstit.'</span>',
|
||||||
'joinfiles'=>$langs->trans('AttachMainDocByDefault'),
|
'joinfiles'=>$langs->trans('AttachMainDocByDefault'),
|
||||||
'content'=>'<span class="small">'.$helpsubstit.'</span>',
|
'content'=>'<span class="small">'.$helpsubstit.'</span>',
|
||||||
@ -822,7 +823,7 @@ if ($resql) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($value == 'fk_user') {
|
} elseif ($value == 'fk_user') {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth150');
|
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'maxwidth150');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($value == 'topic') {
|
} elseif ($value == 'topic') {
|
||||||
print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
||||||
@ -1187,7 +1188,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
|||||||
if ($value == 'fk_user') {
|
if ($value == 'fk_user') {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($user->admin) {
|
if ($user->admin) {
|
||||||
print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth200');
|
print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'minwidth150 maxwidth300');
|
||||||
} else {
|
} else {
|
||||||
if ($context == 'add') { // I am not admin and we show the add form
|
if ($context == 'add') { // I am not admin and we show the add form
|
||||||
print $user->getNomUrl(1); // Me
|
print $user->getNomUrl(1); // Me
|
||||||
|
|||||||
@ -479,7 +479,7 @@ if ($action == 'edit') {
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {
|
if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE_TICKET != 'mail' || !$linuxlike) {
|
if ($conf->global->MAIN_MAIL_SENDMODE_TICKET != 'mail' || !$linuxlike) {
|
||||||
|
|||||||
@ -281,7 +281,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup');
|
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 '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print dol_get_fiche_head();
|
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 should match format module_modulename-x.y[.z].zip
|
||||||
$original_file = basename($_FILES["fileinstall"]["name"]);
|
$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;
|
$newfile = $conf->admin->dir_temp.'/'.$original_file.'/'.$original_file;
|
||||||
|
|
||||||
if (!$original_file) {
|
if (!$original_file) {
|
||||||
@ -878,7 +878,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$codeenabledisable .= '<!-- Message to show: '.$warningmessage.' -->'."\n";
|
$codeenabledisable .= '<!-- Message to show: '.$warningmessage.' -->'."\n";
|
||||||
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&token='.newToken().'&module_position='.$module_position.'&action=set&value='.$modName.'&mode='.$mode.$param.'"';
|
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&token='.newToken().'&module_position='.$module_position.'&action=set&token='.newToken().'&value='.$modName.'&mode='.$mode.$param.'"';
|
||||||
if ($warningmessage) {
|
if ($warningmessage) {
|
||||||
$codeenabledisable .= ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
|
$codeenabledisable .= ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -235,7 +235,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->MRP_MO_ADDON == $file) {
|
if ($conf->global->MRP_MO_ADDON == $file) {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -359,13 +359,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->MRP_MO_ADDON_PDF == $name) {
|
if ($conf->global->MRP_MO_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,7 @@ if ($action == 'add_currency') {
|
|||||||
|
|
||||||
|
|
||||||
$TCurrency = array();
|
$TCurrency = array();
|
||||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE entity = '.$conf->entity;
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."multicurrency WHERE entity = ".((int) $conf->entity);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
while ($obj = $db->fetch_object($resql)) {
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/credtitransfer.php
|
* \file htdocs/admin/paymentbybanktransfer.php
|
||||||
* \ingroup paymentbybanktransfer
|
* \ingroup paymentbybanktransfer
|
||||||
* \brief Page to setup payments by credit transfer
|
* \brief Page to setup payments by credit transfer
|
||||||
*/
|
*/
|
||||||
@ -144,7 +144,7 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_valu
|
|||||||
print load_fiche_titre($langs->trans("CreditTransferSetup"), $linkback, 'title_setup');
|
print load_fiche_titre($langs->trans("CreditTransferSetup"), $linkback, 'title_setup');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=set">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
@ -298,7 +298,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -306,7 +306,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -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 '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -236,7 +236,7 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">';
|
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_edit_add();
|
||||||
print img_picto('', 'switch_off');
|
print img_picto('', 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
@ -312,7 +312,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -320,7 +320,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -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 '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -278,7 +278,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->PROPALE_ADDON == "$file") {
|
if ($conf->global->PROPALE_ADDON == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -402,13 +402,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->PROPALE_ADDON_PDF == "$name") {
|
if ($conf->global->PROPALE_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -658,11 +658,11 @@ if ($conf->banque->enabled)
|
|||||||
{
|
{
|
||||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL))
|
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -350,15 +350,15 @@ if ($mode == 'config' && $user->admin) {
|
|||||||
print '<td>'.$langs->trans($printer->listprinters[$line]['fk_profile_name']).'</td>';
|
print '<td>'.$langs->trans($printer->listprinters[$line]['fk_profile_name']).'</td>';
|
||||||
print '<td>'.$printer->listprinters[$line]['parameter'].'</td>';
|
print '<td>'.$printer->listprinters[$line]['parameter'].'</td>';
|
||||||
// edit icon
|
// edit icon
|
||||||
print '<td class="right"><a class="editfielda marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=editprinter&printerid='.$printer->listprinters[$line]['rowid'].'">';
|
print '<td class="right"><a class="editfielda marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=editprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'">';
|
||||||
print img_picto($langs->trans("Edit"), 'edit');
|
print img_picto($langs->trans("Edit"), 'edit');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
// delete icon
|
// delete icon
|
||||||
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=deleteprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.$printer->listprinters[$line]['name'].'">';
|
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=deleteprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||||
print img_picto($langs->trans("Delete"), 'delete');
|
print img_picto($langs->trans("Delete"), 'delete');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
// test icon
|
// test icon
|
||||||
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.$printer->listprinters[$line]['name'].'">';
|
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||||
print img_picto($langs->trans("TestPrinter"), 'printer');
|
print img_picto($langs->trans("TestPrinter"), 'printer');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -438,15 +438,15 @@ if ($mode == 'template' && $user->admin) {
|
|||||||
print '<td>'.$printer->listprinterstemplates[$line]['name'].'</td>';
|
print '<td>'.$printer->listprinterstemplates[$line]['name'].'</td>';
|
||||||
print '<td>'.dol_htmlentitiesbr($printer->listprinterstemplates[$line]['template']).'</td>';
|
print '<td>'.dol_htmlentitiesbr($printer->listprinterstemplates[$line]['template']).'</td>';
|
||||||
// edit icon
|
// edit icon
|
||||||
print '<td><a class="editfielda paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=edittemplate&templateid='.$printer->listprinterstemplates[$line]['rowid'].'">';
|
print '<td><a class="editfielda paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=edittemplate&token='.newToken().'&templateid='.$printer->listprinterstemplates[$line]['rowid'].'">';
|
||||||
print img_picto($langs->trans("Edit"), 'edit');
|
print img_picto($langs->trans("Edit"), 'edit');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
// delete icon
|
// delete icon
|
||||||
print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=deletetemplate&templateid='.$printer->listprinterstemplates[$line]['rowid'].'&templatename='.$printer->listprinterstemplates[$line]['name'].'">';
|
print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=deletetemplate&token='.newToken().'&templateid='.$printer->listprinterstemplates[$line]['rowid'].'&templatename='.urlencode($printer->listprinterstemplates[$line]['name']).'">';
|
||||||
print img_picto($langs->trans("Delete"), 'delete');
|
print img_picto($langs->trans("Delete"), 'delete');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
// test icon
|
// test icon
|
||||||
print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=testtemplate&templateid='.$printer->listprinterstemplates[$line]['rowid'].'&templatename='.$printer->listprinterstemplates[$line]['name'].'">';
|
print '<a class="paddingleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=template&action=testtemplate&token='.newToken().'&templateid='.$printer->listprinterstemplates[$line]['rowid'].'&templatename='.urlencode($printer->listprinterstemplates[$line]['name']).'">';
|
||||||
print img_picto($langs->trans("TestPrinterTemplate"), 'printer');
|
print img_picto($langs->trans("TestPrinterTemplate"), 'printer');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -235,7 +235,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") {
|
if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -363,13 +363,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->RECEPTION_ADDON_PDF == $name) {
|
if ($conf->global->RECEPTION_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -260,7 +260,7 @@ foreach ($arrayhandler as $key => $module) {
|
|||||||
//print img_picto('', 'tick');
|
//print img_picto('', 'tick');
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setgeneraterule&token='.newToken().'&value='.$key.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setgeneraterule&token='.newToken().'&value='.$key.'">';
|
||||||
//print $langs->trans("Activate");
|
//print $langs->trans("Activate");
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
@ -111,9 +111,9 @@ if (function_exists("imagecreatefrompng")) {
|
|||||||
print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA');
|
print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
|
if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_SECURITY_ENABLECAPTCHA&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_SECURITY_ENABLECAPTCHA&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_SECURITY_ENABLECAPTCHA&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_SECURITY_ENABLECAPTCHA&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -130,9 +130,9 @@ if (!empty($conf->use_javascript_ajax)) {
|
|||||||
print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS');
|
print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_USE_ADVANCED_PERMS&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_USE_ADVANCED_PERMS&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_USE_ADVANCED_PERMS&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_USE_ADVANCED_PERMS&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (!empty($conf->global->ADHERENT_USE_SPIP)) {
|
|||||||
} else {
|
} else {
|
||||||
print dol_get_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
print dol_get_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||||
|
|
||||||
$link = '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value=1&name=ADHERENT_USE_SPIP">';
|
$link = '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value=1&name=ADHERENT_USE_SPIP">';
|
||||||
//$link.=$langs->trans("Activate");
|
//$link.=$langs->trans("Activate");
|
||||||
$link .= img_picto($langs->trans("Disabled"), 'switch_off');
|
$link .= img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
$link .= '</a>';
|
$link .= '</a>';
|
||||||
|
|||||||
@ -565,13 +565,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->STOCK_ADDON_PDF == $name) {
|
if ($conf->global->STOCK_ADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -256,7 +256,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") {
|
if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
||||||
//{
|
//{
|
||||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
/*}
|
/*}
|
||||||
@ -386,7 +386,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,9 +395,9 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") {
|
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") {
|
||||||
//print img_picto($langs->trans("Default"),'on');
|
//print img_picto($langs->trans("Default"),'on');
|
||||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -269,7 +269,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") {
|
if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") {
|
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
} else {
|
} else {
|
||||||
@ -390,7 +390,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") {
|
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -472,11 +472,11 @@ if ($conf->banque->enabled)
|
|||||||
{
|
{
|
||||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
|
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -372,7 +372,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scandir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,9 +381,9 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name") {
|
if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name") {
|
||||||
//print img_picto($langs->trans("Default"),'on');
|
//print img_picto($langs->trans("Default"),'on');
|
||||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scandir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scandir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -257,7 +257,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") {
|
if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") {
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -380,22 +380,22 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print "<td align=\"center\">\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print "<td align=\"center\">";
|
print '<td align="center">';
|
||||||
if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") {
|
if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") {
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -503,9 +503,9 @@ if ($conf->banque->enabled) {
|
|||||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
|
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
|
||||||
} else {
|
} else {
|
||||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL)) {
|
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (!$base) {
|
|||||||
print '<td align="right">'.$obj->Check_time.'</td>';
|
print '<td align="right">'.$obj->Check_time.'</td>';
|
||||||
print '<td align="right">'.$obj->Collation;
|
print '<td align="right">'.$obj->Collation;
|
||||||
if (isset($obj->Collation) && (in_array($obj->Collation, array("utf8mb4_general_ci", "utf8mb4_unicode_ci", "latin1_swedish_ci")))) {
|
if (isset($obj->Collation) && (in_array($obj->Collation, array("utf8mb4_general_ci", "utf8mb4_unicode_ci", "latin1_swedish_ci")))) {
|
||||||
print '<br><a class="reposition" href="database-tables.php?action=convertutf8&table='.urlencode($obj->Name).'&token='.newtoken().'">'.$langs->trans("Convert").' UTF8</a>';
|
print '<br><a class="reposition" href="database-tables.php?action=convertutf8&table='.urlencode($obj->Name).'&token='.newToken().'">'.$langs->trans("Convert").' UTF8</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -51,7 +51,7 @@ if ($action == 'getlastversion') {
|
|||||||
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
|
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
|
||||||
//var_dump($result['content']);
|
//var_dump($result['content']);
|
||||||
if (function_exists('simplexml_load_string')) {
|
if (function_exists('simplexml_load_string')) {
|
||||||
$sfurl = simplexml_load_string($result['content']);
|
$sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans("ErrorPHPDoesNotSupport", "xml"), null, 'errors');
|
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') {
|
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
|
||||||
$xmlfile = $xmlarray['content'];
|
$xmlfile = $xmlarray['content'];
|
||||||
//print "xmlfilestart".$xmlfile."xmlfileend";
|
//print "xmlfilestart".$xmlfile."xmlfileend";
|
||||||
$xml = simplexml_load_string($xmlfile);
|
$xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
|
||||||
} else {
|
} 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'];
|
$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');
|
setEventMessages($errormsg, null, 'errors');
|
||||||
|
|||||||
@ -91,6 +91,7 @@ $modules_files = array();
|
|||||||
$modules_fullpath = array();
|
$modules_fullpath = array();
|
||||||
$modulesdir = dolGetModulesDirs();
|
$modulesdir = dolGetModulesDirs();
|
||||||
$rights_ids = array();
|
$rights_ids = array();
|
||||||
|
$arrayofpermissions = array();
|
||||||
|
|
||||||
foreach ($modulesdir as $dir) {
|
foreach ($modulesdir as $dir) {
|
||||||
$handle = @opendir(dol_osencode($dir));
|
$handle = @opendir(dol_osencode($dir));
|
||||||
@ -155,7 +156,7 @@ foreach ($modules as $key => $module) {
|
|||||||
if (empty($rights[0])) {
|
if (empty($rights[0])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$arrayofpermissions[$rights[0]] = array('label'=> 'user->rights->'.$module->rights_class.'->'.$rights[4].(empty($rights[5]) ? '' : '->'.$rights[5]));
|
||||||
$permission[] = $rights[0];
|
$permission[] = $rights[0];
|
||||||
|
|
||||||
array_push($rights_ids, $rights[0]);
|
array_push($rights_ids, $rights[0]);
|
||||||
@ -336,8 +337,10 @@ foreach ($moduleList as $module) {
|
|||||||
$idperms = '';
|
$idperms = '';
|
||||||
|
|
||||||
foreach ($module->permission as $permission) {
|
foreach ($module->permission as $permission) {
|
||||||
$idperms .= ($idperms ? ", " : "").$permission;
|
|
||||||
$translationKey = "Permission".$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($conf->global->MAIN_SHOW_PERMISSION)) {
|
||||||
if (empty($langs->tab_translate[$translationKey])) {
|
if (empty($langs->tab_translate[$translationKey])) {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ print '<br>';
|
|||||||
print '<strong>'.$langs->trans("XDebug").'</strong>: ';
|
print '<strong>'.$langs->trans("XDebug").'</strong>: ';
|
||||||
$test = !function_exists('xdebug_is_enabled');
|
$test = !function_exists('xdebug_is_enabled');
|
||||||
if ($test) {
|
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 {
|
} else {
|
||||||
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
|
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>';
|
print ' - '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php">XDebug admin page</a>';
|
||||||
|
|||||||
@ -98,7 +98,7 @@ if (!ini_get('session.cookie_samesite') || ini_get('session.cookie_samesite') ==
|
|||||||
print ' '.img_warning().' <span class="opacitymedium">'.$langs->trans("WarningPaypalPaymentNotCompatibleWithStrict")."</span>";
|
print ' '.img_warning().' <span class="opacitymedium">'.$langs->trans("WarningPaypalPaymentNotCompatibleWithStrict")."</span>";
|
||||||
}
|
}
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<strong>PHP open_basedir</strong> = ".(ini_get('open_basedir') ? ini_get('open_basedir') : yn(0).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("ARestrictedPath").', '.$langs->transnoentitiesnoconv("Example").' '.$_SERVER["DOCUMENT_ROOT"]).')</span>')."<br>\n";
|
print "<strong>PHP open_basedir</strong> = ".(ini_get('open_basedir') ? ini_get('open_basedir') : yn(0).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("ARestrictedPath").', '.$langs->transnoentitiesnoconv("Example").': '.$_SERVER["DOCUMENT_ROOT"].','.DOL_DATA_ROOT).')</span>')."<br>\n";
|
||||||
print "<strong>PHP allow_url_fopen</strong> = ".(ini_get('allow_url_fopen') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_fopen') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n";
|
print "<strong>PHP allow_url_fopen</strong> = ".(ini_get('allow_url_fopen') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_fopen') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n";
|
||||||
print "<strong>PHP allow_url_include</strong> = ".(ini_get('allow_url_include') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_include') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n";
|
print "<strong>PHP allow_url_include</strong> = ".(ini_get('allow_url_include') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_include') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n";
|
||||||
//print "<strong>PHP safe_mode</strong> = ".(ini_get('safe_mode') ? ini_get('safe_mode') : yn(0)).' <span class="opacitymedium">'.$langs->trans("Deprecated")." (removed in PHP 5.4)</span><br>\n";
|
//print "<strong>PHP safe_mode</strong> = ".(ini_get('safe_mode') ? ini_get('safe_mode') : yn(0)).' <span class="opacitymedium">'.$langs->trans("Deprecated")." (removed in PHP 5.4)</span><br>\n";
|
||||||
@ -340,69 +340,6 @@ if (empty($out)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
|
||||||
print '<br>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
|
|
||||||
|
|
||||||
|
|
||||||
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
|
||||||
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_HASH_ALGO)." ";
|
|
||||||
if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
|
|
||||||
print '<span class="opacitymedium"> If unset: \'md5\'</span>';
|
|
||||||
}
|
|
||||||
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
|
||||||
print '<br><strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_SALT).'<br>';
|
|
||||||
} else {
|
|
||||||
print '<span class="opacitymedium">('.$langs->trans("Recommended").': password_hash)</span>';
|
|
||||||
print '<br>';
|
|
||||||
}
|
|
||||||
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
|
||||||
print '<div class="info">The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.<br>';
|
|
||||||
print 'If you really want to switch, you must:<br>';
|
|
||||||
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'<br>';
|
|
||||||
print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password<br>';
|
|
||||||
print '- You can now logout and login with this new password. You must now reset password of all other users.<br>';
|
|
||||||
print '</div><br>';
|
|
||||||
}
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<strong>MAIN_SECURITY_ANTI_SSRF_SERVER_IP</strong> = '.(empty($conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span> <span class="opacitymedium">('.$langs->trans("Recommended").': List of static IPs of server separated with coma - '.$langs->trans("Note").': common loopback ip like 127.*.*.*, [::1] are already added)</span>' : $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP)."<br>";
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.(empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES) ? '0' : $conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES).' <span class="opacitymedium">('.$langs->trans("Recommended").': 0)</span><br>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<strong>MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE</strong> = '.(empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE).' <span class="opacitymedium">('.$langs->trans("Recommended").': 1)</span><br>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."<br>";
|
|
||||||
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_EXEC_USE_POPEN</strong> = ';
|
|
||||||
if (empty($conf->global->MAIN_EXEC_USE_POPEN)) {
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>';
|
|
||||||
} else {
|
|
||||||
print $conf->global->MAIN_EXEC_USE_POPEN;
|
|
||||||
}
|
|
||||||
if ($execmethod == 1) {
|
|
||||||
print '<span class="opacitymedium">, "exec" PHP method will be used for shell commands';
|
|
||||||
print ' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 1)';
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
if ($execmethod == 2) {
|
|
||||||
print '<span class="opacitymedium">, "popen" PHP method will be used for shell commands';
|
|
||||||
print ' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 1)';
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
print "<br>";
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Modules/Applications
|
// Modules/Applications
|
||||||
@ -454,7 +391,7 @@ if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->api->enabled)) {
|
if (!empty($conf->api->enabled)) {
|
||||||
print '<strong>API_ENDPOINT_RULES</strong> = '.(empty($conf->global->API_ENDPOINT_RULES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Example").': endpoint1:1,endpoint2:1,...)</span>' : $conf->global->API_ENDPOINT_RULES)."<br>\n";
|
print '<strong>API_ENDPOINT_RULES</strong> = '.(empty($conf->global->API_ENDPOINT_RULES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>' : $conf->global->API_ENDPOINT_RULES)."<br>\n";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -462,6 +399,76 @@ if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
|
|||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
|
||||||
|
|
||||||
|
|
||||||
|
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
||||||
|
print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_HASH_ALGO)." ";
|
||||||
|
if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
|
||||||
|
print '<span class="opacitymedium"> If unset: \'md5\'</span>';
|
||||||
|
}
|
||||||
|
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
||||||
|
print '<br><strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_SALT).'<br>';
|
||||||
|
} else {
|
||||||
|
print '<span class="opacitymedium">('.$langs->trans("Recommended").': password_hash)</span>';
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
|
||||||
|
print '<div class="info">The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.<br>';
|
||||||
|
print 'If you really want to switch, you must:<br>';
|
||||||
|
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'<br>';
|
||||||
|
print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password<br>';
|
||||||
|
print '- You can now logout and login with this new password. You must now reset password of all other users.<br>';
|
||||||
|
print '</div><br>';
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<strong>MAIN_SECURITY_ANTI_SSRF_SERVER_IP</strong> = '.(empty($conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span> <span class="opacitymedium">('.$langs->trans("Recommended").': List of static IPs of server separated with coma - '.$langs->trans("Note").': common loopback ip like 127.*.*.*, [::1] are already added)</span>' : $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP)."<br>";
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<strong>MAIN_ALLOW_SVG_FILES_AS_IMAGES</strong> = '.(empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES) ? '0' : $conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES).' <span class="opacitymedium">('.$langs->trans("Recommended").': 0)</span><br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<strong>MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE</strong> = '.(empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE).' <span class="opacitymedium">('.$langs->trans("Recommended").': 1)</span><br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."<br>";
|
||||||
|
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").': 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>";
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<strong>MAIN_EXEC_USE_POPEN</strong> = ';
|
||||||
|
if (empty($conf->global->MAIN_EXEC_USE_POPEN)) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>';
|
||||||
|
} else {
|
||||||
|
print $conf->global->MAIN_EXEC_USE_POPEN;
|
||||||
|
}
|
||||||
|
if ($execmethod == 1) {
|
||||||
|
print '<span class="opacitymedium">, "exec" PHP method will be used for shell commands';
|
||||||
|
print ' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 1)';
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
if ($execmethod == 2) {
|
||||||
|
print '<span class="opacitymedium">, "popen" PHP method will be used for shell commands';
|
||||||
|
print ' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 1)';
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print "<br>";
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -400,13 +400,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -180,10 +180,11 @@ $head = ticketAdminPrepareHead();
|
|||||||
|
|
||||||
print dol_get_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket");
|
print dol_get_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket");
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.dol_buildpath('/public/ticket/index.php', 1).'" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.DOL_URL_ROOT.'/public/ticket/index.php" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
$param = '';
|
||||||
|
|
||||||
$enabledisablehtml = $langs->trans("TicketsActivatePublicInterface").' ';
|
$enabledisablehtml = $langs->trans("TicketsActivatePublicInterface").' ';
|
||||||
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user