Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8315d9e10d
21
.travis.yml
21
.travis.yml
@ -93,23 +93,26 @@ install:
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION"
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
composer -n require phpunit/phpunit ^6 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
|
||||
composer -n require phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
@ -117,6 +120,7 @@ install:
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
echo
|
||||
@ -166,6 +170,10 @@ before_script:
|
||||
which phpcs
|
||||
phpcs --version | head -
|
||||
phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
which var_dump_check
|
||||
var_dump_check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
which phpunit
|
||||
@ -297,6 +305,17 @@ script:
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking missing debug"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
|
||||
@ -275,6 +275,13 @@ RESTLER:
|
||||
with
|
||||
|
||||
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
|
||||
|
||||
* Replace CommentParser.php line 423
|
||||
elseif (count($value) && is_numeric($value[0]))
|
||||
|
||||
with
|
||||
|
||||
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
|
||||
|
||||
|
||||
+With swagger 2 provided into /explorer:
|
||||
|
||||
@ -540,7 +540,7 @@ if ($action == 'create') {
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date document creation
|
||||
// Date document export
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
|
||||
print '<td>';
|
||||
@ -548,7 +548,7 @@ if ($action == 'create') {
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date document creation
|
||||
// Date document validation
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
|
||||
print '<td>';
|
||||
@ -607,6 +607,7 @@ if ($action == 'create') {
|
||||
print '<br>';
|
||||
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
@ -647,11 +648,14 @@ if ($action == 'create') {
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Empty line is the first line of $object->linesmvt
|
||||
// So we must get the first line (the empty one) and put it at the end of the array
|
||||
// in order to display it correctly to the user
|
||||
$empty_line = array_shift($object->linesmvt);
|
||||
$object->linesmvt[]= $empty_line;
|
||||
// Add an empty line if there is not yet
|
||||
if (!empty($object->linesmvt[0])) {
|
||||
$tmpline = $object->linesmvt[0];
|
||||
if (!empty($tmpline->numero_compte)) {
|
||||
$line = new BookKeepingLine();
|
||||
$object->linesmvt[] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($object->linesmvt as $line) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -606,9 +606,13 @@ class BookKeeping extends CommonObject
|
||||
if (empty($this->credit)) {
|
||||
$this->credit = 0;
|
||||
}
|
||||
if (empty($this->montant)) {
|
||||
$this->montant = 0;
|
||||
}
|
||||
|
||||
$this->debit = price2num($this->debit, 'MT');
|
||||
$this->credit = price2num($this->credit, 'MT');
|
||||
$this->montant = price2num($this->montant, 'MT');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
@ -1661,11 +1665,10 @@ class BookKeeping extends CommonObject
|
||||
$this->doc_date = $this->db->jdate($obj->doc_date);
|
||||
$this->doc_ref = $obj->doc_ref;
|
||||
$this->doc_type = $obj->doc_type;
|
||||
$this->date_creation = $obj->date_creation;
|
||||
$this->date_modification = $obj->date_modification;
|
||||
$this->date_export = $obj->date_export;
|
||||
$this->date_validation = $obj->date_validated;
|
||||
$this->date_validation = $obj->date_validation;
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||
$this->date_export = $this->db->jdate($obj->date_export);
|
||||
$this->date_validation = $this->db->jdate($obj->date_validation);
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
||||
|
||||
@ -38,7 +38,7 @@ $validatemonth = GETPOST('validatemonth', 'int');
|
||||
$validateyear = GETPOST('validateyear', 'int');
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
@ -75,7 +75,7 @@ $action = GETPOST('action', 'aZ09');
|
||||
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
|
||||
@ -108,7 +108,7 @@ if ($action == 'set_default') {
|
||||
$res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
// Use vat for invoice creation
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
|
||||
@ -241,10 +241,10 @@ $arraychoices = array('0'=>$langs->trans("None"));
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
$arraychoices['bankdirect'] = $langs->trans("MoreActionBankDirect");
|
||||
}
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
$arraychoices['invoiceonly'] = $langs->trans("MoreActionInvoiceOnly");
|
||||
}
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
$arraychoices['bankviainvoice'] = $langs->trans("MoreActionBankViaInvoice");
|
||||
}
|
||||
print '<td>';
|
||||
@ -256,7 +256,7 @@ print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Use vat for invoice creation
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print '<td>';
|
||||
|
||||
@ -162,11 +162,11 @@ if ($object->id > 0) {
|
||||
|
||||
|
||||
$newcardbutton = '';
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).($object->id > 0 ? '?id='.$object->id : '').'&origin=member&originid='.$id);
|
||||
}
|
||||
|
||||
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
print '<br>';
|
||||
|
||||
$param = '&id='.$id;
|
||||
|
||||
@ -285,7 +285,7 @@ if (empty($reshook)) {
|
||||
$object->lastname = trim(GETPOST("lastname", 'alphanohtml'));
|
||||
$object->gender = trim(GETPOST("gender", 'alphanohtml'));
|
||||
$object->login = trim(GETPOST("login", 'alphanohtml'));
|
||||
$object->pass = trim(GETPOST("pass", 'alpha'));
|
||||
$object->pass = trim(GETPOST("pass", 'none')); // For password, we must use 'none'
|
||||
|
||||
$object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated
|
||||
$object->company = trim(GETPOST("societe", 'alphanohtml'));
|
||||
@ -450,8 +450,8 @@ if (empty($reshook)) {
|
||||
$email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
|
||||
$url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
|
||||
$login = GETPOST("member_login", 'alphanohtml');
|
||||
$pass = GETPOST("password", 'alpha');
|
||||
$photo = GETPOST("photo", 'alpha');
|
||||
$pass = GETPOST("password", 'none'); // For password, we use 'none'
|
||||
$photo = GETPOST("photo", 'alphanohtml');
|
||||
$morphy = GETPOST("morphy", 'alphanohtml');
|
||||
$public = GETPOST("public", 'alphanohtml');
|
||||
|
||||
@ -999,7 +999,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
$generated_password = getRandomPassword(false);
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td>';
|
||||
print '<input type="text" class="minwidth300" maxlength="50" name="password" value="'.$generated_password.'">';
|
||||
print '<input type="text" class="minwidth300" maxlength="50" name="password" value="'.dol_escape_htmltag($generated_password).'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1224,7 +1224,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Password
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("pass") ? GETPOST("pass", '', 2) : $object->pass).'"></td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'none', 2) : $object->pass).'"></td></tr>';
|
||||
}
|
||||
// Morphy
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
|
||||
@ -831,11 +831,11 @@ if ($rowid > 0) {
|
||||
$bankviainvoice = 1;
|
||||
}
|
||||
} else {
|
||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
$bankviainvoice = 1;
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) {
|
||||
$bankdirect = 1;
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
$invoiceonly = 1;
|
||||
}
|
||||
}
|
||||
@ -982,7 +982,7 @@ if ($rowid > 0) {
|
||||
print '"></td></tr>';
|
||||
|
||||
// Complementary action
|
||||
if ((!empty($conf->banque->enabled) || !empty($conf->facture->enabled)) && empty($conf->global->ADHERENT_SUBSCRIPTION_HIDECOMPLEMENTARYACTIONS)) {
|
||||
if ((!empty($conf->banque->enabled) || isModEnabled('facture')) && empty($conf->global->ADHERENT_SUBSCRIPTION_HIDECOMPLEMENTARYACTIONS)) {
|
||||
$company = new Societe($db);
|
||||
if ($object->fk_soc) {
|
||||
$result = $company->fetch($object->fk_soc);
|
||||
@ -1003,7 +1003,7 @@ if ($rowid > 0) {
|
||||
print '><label for="bankdirect"> '.$langs->trans("MoreActionBankDirect").'</label><br>';
|
||||
}
|
||||
// Add invoice with no payments
|
||||
if (!empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(!empty($invoiceonly) ? ' checked' : '');
|
||||
//if (empty($object->fk_soc)) print ' disabled';
|
||||
print '><label for="invoiceonly"> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
@ -1033,7 +1033,7 @@ if ($rowid > 0) {
|
||||
print '</label><br>';
|
||||
}
|
||||
// Add invoice with payments
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
|
||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(!empty($bankviainvoice) ? ' checked' : '');
|
||||
//if (empty($object->fk_soc)) print ' disabled';
|
||||
print '><label for="bankviainvoice"> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
|
||||
@ -53,18 +53,18 @@ if ($reshook < 0) {
|
||||
|
||||
if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|| ($action == 'updateedit')) {
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if ($action != 'updateedit' && !$error) {
|
||||
@ -119,17 +119,17 @@ print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->
|
||||
|
||||
// Name
|
||||
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'.(GETPOSTISSET('nom') ? GETPOST('nom', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : '')).'"'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag(GETPOSTISSET('nom') ? GETPOST('nom', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : '')).'"'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
|
||||
|
||||
// Address
|
||||
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.(GETPOSTISSET('address') ? GETPOST('address', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOSTISSET('address') ? GETPOST('address', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : '')).'"></td></tr>'."\n";
|
||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.dol_escape_htmltag(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : '')).'"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||
print '<input name="town" class="minwidth100" id="town" value="'.(GETPOSTISSET('town') ? GETPOST('town', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : '')).'"></td></tr>'."\n";
|
||||
print '<input name="town" class="minwidth100" id="town" value="'.dol_escape_htmltag(GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : '')).'"></td></tr>'."\n";
|
||||
|
||||
// Country
|
||||
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||
@ -142,33 +142,33 @@ print '</td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
||||
print img_picto('', 'state', 'class="pictofixedwidth"');
|
||||
print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id');
|
||||
print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="tel" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.(GETPOSTISSET('tel') ? GETPOST('tel', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_PHONE) ? $conf->global->MAIN_INFO_ACCOUNTANT_PHONE : '')).'"></td></tr>';
|
||||
print '<input name="tel" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('tel') ? GETPOST('tel', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_PHONE) ? $conf->global->MAIN_INFO_ACCOUNTANT_PHONE : '')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_FAX) ? $conf->global->MAIN_INFO_ACCOUNTANT_FAX : '')).'"></td></tr>';
|
||||
print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_FAX) ? $conf->global->MAIN_INFO_ACCOUNTANT_FAX : '')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.(GETPOSTISSET('mail') ? GETPOST('mail', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_MAIL) ? $conf->global->MAIN_INFO_ACCOUNTANT_MAIL : '')).'"></td></tr>';
|
||||
print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_MAIL) ? $conf->global->MAIN_INFO_ACCOUNTANT_MAIL : '')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||
print img_picto('', 'globe', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="web" id="web" class="maxwidth300 widthcentpercentminusx" value="'.(GETPOSTISSET('web') ? GETPOST('web', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_WEB) ? $conf->global->MAIN_INFO_ACCOUNTANT_WEB : '')).'"></td></tr>';
|
||||
print '<input name="web" id="web" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('web') ? GETPOST('web', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_WEB) ? $conf->global->MAIN_INFO_ACCOUNTANT_WEB : '')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Code
|
||||
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
|
||||
print '<input name="code" id="code" class="minwidth100" value="'.(GETPOSTISSET('code') ? GETPOST('code', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_CODE) ? $conf->global->MAIN_INFO_ACCOUNTANT_CODE : '')).'"></td></tr>'."\n";
|
||||
print '<input name="code" id="code" class="minwidth100" value="'.dol_escape_htmltag(GETPOSTISSET('code') ? GETPOST('code', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_CODE) ? $conf->global->MAIN_INFO_ACCOUNTANT_CODE : '')).'"></td></tr>'."\n";
|
||||
|
||||
// Note
|
||||
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||
|
||||
@ -91,9 +91,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
$db->begin();
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM", GETPOST("nom", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("MAIN_INFO_SOCIETE_ADDRESS", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("MAIN_INFO_SOCIETE_TOWN", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("MAIN_INFO_SOCIETE_ADDRESS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("MAIN_INFO_SOCIETE_TOWN", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("MAIN_INFO_SOCIETE_ZIP", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
@ -178,19 +178,19 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
}
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_GDPR", GETPOST("MAIN_INFO_GDPR", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_GDPR", GETPOST("MAIN_INFO_GDPR", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("object", 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("object", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("SOCIETE_FISCAL_MONTH_START", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -403,18 +403,18 @@ print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->
|
||||
|
||||
// Name
|
||||
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET('nom') ? GETPOST('nom', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? $conf->global->MAIN_INFO_SOCIETE_NOM : ''))).'"'.(empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET('nom') ? GETPOST('nom', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? $conf->global->MAIN_INFO_SOCIETE_NOM : ''))).'"'.(empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
|
||||
|
||||
// Address
|
||||
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||
print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'.(GETPOSTISSET('MAIN_INFO_SOCIETE_ADDRESS') ? GETPOST('MAIN_INFO_SOCIETE_ADDRESS', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS) ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||
print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'.(GETPOSTISSET('MAIN_INFO_SOCIETE_ADDRESS') ? GETPOST('MAIN_INFO_SOCIETE_ADDRESS', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS) ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||
|
||||
// Zip
|
||||
print '<tr class="oddeven" id="trzipbeforecountry"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||
print '<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_ZIP') ? GETPOST('MAIN_INFO_SOCIETE_ZIP', 'alpha') : (!empty($conf->global->MAIN_INFO_SOCIETE_ZIP) ? $conf->global->MAIN_INFO_SOCIETE_ZIP : ''))).'"></td></tr>'."\n";
|
||||
print '<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_ZIP') ? GETPOST('MAIN_INFO_SOCIETE_ZIP', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_ZIP) ? $conf->global->MAIN_INFO_SOCIETE_ZIP : ''))).'"></td></tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven" id="trtownbeforecountry"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_TOWN') ? GETPOST('MAIN_INFO_SOCIETE_TOWN', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? $conf->global->MAIN_INFO_SOCIETE_TOWN : ''))).'"></td></tr>'."\n";
|
||||
print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_TOWN') ? GETPOST('MAIN_INFO_SOCIETE_TOWN', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? $conf->global->MAIN_INFO_SOCIETE_TOWN : ''))).'"></td></tr>'."\n";
|
||||
|
||||
// Country
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td>';
|
||||
@ -564,17 +564,17 @@ $langs->load("companies");
|
||||
|
||||
// Managing Director(s)
|
||||
print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_MANAGERS') ? GETPOST('MAIN_INFO_SOCIETE_MANAGERS', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MANAGERS) ? $conf->global->MAIN_INFO_SOCIETE_MANAGERS : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_MANAGERS') ? GETPOST('MAIN_INFO_SOCIETE_MANAGERS', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MANAGERS) ? $conf->global->MAIN_INFO_SOCIETE_MANAGERS : ''))).'"></td></tr>';
|
||||
|
||||
// GDPR contact
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
|
||||
print '</td><td>';
|
||||
print '<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET("MAIN_INFO_GDPR") ? GETPOST("MAIN_INFO_GDPR", 'nohtml') : (!empty($conf->global->MAIN_INFO_GDPR) ? $conf->global->MAIN_INFO_GDPR : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET("MAIN_INFO_GDPR") ? GETPOST("MAIN_INFO_GDPR", 'alphanohtml') : (!empty($conf->global->MAIN_INFO_GDPR) ? $conf->global->MAIN_INFO_GDPR : ''))).'"></td></tr>';
|
||||
|
||||
// Capital
|
||||
print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||
print '<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag((GETPOSTISSET('capital') ? GETPOST('capital', 'nohtml') : (!empty($conf->global->MAIN_INFO_CAPITAL) ? $conf->global->MAIN_INFO_CAPITAL : ''))).'"></td></tr>';
|
||||
print '<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag((GETPOSTISSET('capital') ? GETPOST('capital', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_CAPITAL) ? $conf->global->MAIN_INFO_CAPITAL : ''))).'"></td></tr>';
|
||||
|
||||
// Juridical Status
|
||||
print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||
|
||||
@ -488,14 +488,14 @@ $tabcond[2] = true;
|
||||
$tabcond[3] = true;
|
||||
$tabcond[4] = true;
|
||||
$tabcond[5] = (!empty($conf->societe->enabled) || !empty($conf->adherent->enabled));
|
||||
$tabcond[6] = !empty($conf->agenda->enabled);
|
||||
$tabcond[6] = isModEnabled('agenda');
|
||||
$tabcond[7] = !empty($conf->tax->enabled);
|
||||
$tabcond[8] = !empty($conf->societe->enabled);
|
||||
$tabcond[9] = true;
|
||||
$tabcond[10] = true;
|
||||
$tabcond[11] = (!empty($conf->societe->enabled));
|
||||
$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[12] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[13] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || isModEnabled('facture') || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled) || !empty($conf->supplier_order->enabled));
|
||||
$tabcond[14] = (!empty($conf->product->enabled) && (!empty($conf->ecotax->enabled) || !empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY)));
|
||||
$tabcond[15] = true;
|
||||
$tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
||||
@ -508,12 +508,12 @@ $tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enable
|
||||
$tabcond[23] = true;
|
||||
$tabcond[24] = !empty($conf->resource->enabled);
|
||||
$tabcond[25] = !empty($conf->website->enabled);
|
||||
//$tabcond[26]= ! empty($conf->product->enabled);
|
||||
//$tabcond[26]= !empty($conf->product->enabled);
|
||||
$tabcond[27] = !empty($conf->societe->enabled);
|
||||
$tabcond[28] = !empty($conf->holiday->enabled);
|
||||
$tabcond[29] = !empty($conf->projet->enabled);
|
||||
$tabcond[29] = !empty($conf->project->enabled);
|
||||
$tabcond[30] = !empty($conf->label->enabled);
|
||||
//$tabcond[31]= ! empty($conf->accounting->enabled);
|
||||
//$tabcond[31]= !empty($conf->accounting->enabled);
|
||||
$tabcond[32] = (!empty($conf->holiday->enabled) || !empty($conf->hrm->enabled));
|
||||
$tabcond[33] = !empty($conf->hrm->enabled);
|
||||
$tabcond[34] = !empty($conf->hrm->enabled);
|
||||
@ -906,7 +906,7 @@ if (empty($reshook)) {
|
||||
} elseif (in_array($keycode, array('joinfile', 'private', 'pos', 'position', 'scale', 'use_default'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
} else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
@ -975,7 +975,7 @@ if (empty($reshook)) {
|
||||
} elseif (in_array($keycode, array('joinfile', 'private', 'pos', 'position', 'scale', 'use_default'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
} else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
@ -550,7 +550,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
|
||||
'recordevent'=>'RecordEvent');
|
||||
$arrayoftypesnocondition = $arrayoftypes;
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
||||
}
|
||||
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
|
||||
|
||||
@ -279,7 +279,7 @@ foreach ($object->fields as $key => $val) {
|
||||
$sql .= "t.".$db->escape($key).", ";
|
||||
}
|
||||
// Add fields from extrafields
|
||||
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ if ($action == 'updateMask') {
|
||||
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$res3 = 0;
|
||||
if (!empty($conf->projet->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
|
||||
if (!empty($conf->project->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
|
||||
$res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm
|
||||
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.$conf->global->EXPENSEREPORT_DRAFT_WATERMARK.'">';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ProjectIsRequiredOnExpenseReports');
|
||||
print '</td><td class="right">';
|
||||
|
||||
@ -63,10 +63,10 @@ $conditions = array(
|
||||
'NOTE_PRIVATE' => 1,
|
||||
'SOCIETE' => 1,
|
||||
'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)),
|
||||
'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||
'DETAILS' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||
'USERSIGN' => 1,
|
||||
'MAILING' => !empty($conf->mailing->enabled),
|
||||
'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
||||
'MAIL' => (isModEnabled('facture') || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
||||
'TICKET' => !empty($conf->ticket->enabled),
|
||||
);
|
||||
// Picto
|
||||
|
||||
@ -99,6 +99,8 @@ if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
if ($mode == 'template') {
|
||||
//dolibarr_del_const($db, "MAIN_THEME", 0); // To be sure we don't have this constant set for all entities
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ print '</td><td class="maxwidthhalf"><span class="opacitymedium">'.$langs->trans
|
||||
// Pass
|
||||
print '<!-- LDAP_ADMIN_PASS -->';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPPassword").'</td><td>';
|
||||
print '<input class="minwidth150" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||
print '<input class="minwidth150" type="password" name="pass" value="'.dol_escape_htmltag($conf->global->LDAP_ADMIN_PASS).'">';
|
||||
print '</td><td><span class="opacitymedium">'.$langs->trans('Password').' (ex: secret)</span></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -169,8 +169,6 @@ $tabhelp[25] = array(
|
||||
);
|
||||
|
||||
|
||||
$elementList = array();
|
||||
|
||||
// We save list of template email Dolibarr can manage. This list can found by a grep into code on "->param['models']"
|
||||
$elementList = array();
|
||||
// Add all and none after the sort
|
||||
@ -187,7 +185,7 @@ if (!empty($conf->recruitment->enabled) && !empty($user->rights->recruitment->re
|
||||
if (!empty($conf->societe->enabled) && !empty($user->rights->societe->lire)) {
|
||||
$elementList['thirdparty'] = img_picto('', 'company', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToThirdparty'));
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$elementList['project'] = img_picto('', 'project', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToProject'));
|
||||
}
|
||||
if (!empty($conf->propal->enabled) && !empty($user->rights->propal->lire)) {
|
||||
@ -196,7 +194,7 @@ if (!empty($conf->propal->enabled) && !empty($user->rights->propal->lire)) {
|
||||
if (!empty($conf->commande->enabled) && !empty($user->rights->commande->lire)) {
|
||||
$elementList['order_send'] = img_picto('', 'order', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendOrder'));
|
||||
}
|
||||
if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
if (isModEnabled('facture') && !empty($user->rights->facture->lire)) {
|
||||
$elementList['facture_send'] = img_picto('', 'bill', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendInvoice'));
|
||||
}
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
@ -226,7 +224,7 @@ if (!empty($conf->ticket->enabled) && !empty($user->rights->ticket->read)) {
|
||||
if (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire)) {
|
||||
$elementList['expensereport_send'] = img_picto('', 'trip', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToTExpenseReport'));
|
||||
}
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
$elementList['actioncomm_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventPush'));
|
||||
}
|
||||
if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) {
|
||||
@ -405,7 +403,7 @@ if (empty($reshook)) {
|
||||
} elseif (in_array($keycode, array('joinfiles', 'private', 'position', 'entity'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
} else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
@ -435,7 +433,14 @@ if (empty($reshook)) {
|
||||
// Modifie valeur des champs
|
||||
$i = 0;
|
||||
foreach ($listfieldmodify as $field) {
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if ($field == 'entity') {
|
||||
// entity not present on listfieldmodify array
|
||||
$keycode = $field;
|
||||
$_POST[$keycode] = $conf->entity;
|
||||
} else {
|
||||
$keycode = $listfieldvalue[$i];
|
||||
}
|
||||
|
||||
if ($field == 'lang') {
|
||||
$keycode = 'langcode';
|
||||
}
|
||||
@ -459,9 +464,6 @@ if (empty($reshook)) {
|
||||
if ($field == 'content_lines') {
|
||||
$_POST['content_lines'] = $_POST['content_lines-'.$rowid];
|
||||
}
|
||||
if ($field == 'entity') {
|
||||
$_POST[$keycode] = $conf->entity;
|
||||
}
|
||||
|
||||
if ($i) {
|
||||
$sql .= ", ";
|
||||
@ -483,7 +485,7 @@ if (empty($reshook)) {
|
||||
} elseif (in_array($keycode, array('joinfiles', 'private', 'position'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
} else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'alphanohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
@ -108,7 +108,7 @@ if ($action == 'update') {
|
||||
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", GETPOST("MAIN_TVAINTRA_NOT_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if (GETPOST('PDF_SHOW_PROJECT_REF_OR_LABEL') == 'no') {
|
||||
dolibarr_del_const($db, "PDF_SHOW_PROJECT", $conf->entity);
|
||||
dolibarr_del_const($db, "PDF_SHOW_PROJECT_TITLE", $conf->entity);
|
||||
@ -482,7 +482,7 @@ print '<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" v
|
||||
print '</td></tr>';
|
||||
|
||||
// Show project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_SHOW_PROJECT").'</td><td>';
|
||||
$tmparray = array('no' => 'No', 'showprojectref' => 'RefProject', 'showprojectlabel' => 'ShowProjectLabel');
|
||||
$showprojectref = empty($conf->global->PDF_SHOW_PROJECT) ? (empty($conf->global->PDF_SHOW_PROJECT_TITLE) ? 'no' : 'showprojectlabel') : 'showprojectref';
|
||||
|
||||
@ -120,7 +120,7 @@ if (!empty($conf->propal->enabled)) {
|
||||
}
|
||||
|
||||
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
print load_fiche_titre($langs->trans("Invoices"), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
||||
@ -45,7 +45,7 @@ $printername = GETPOST('printername', 'alpha');
|
||||
$printerid = GETPOST('printerid', 'int');
|
||||
$parameter = GETPOST('parameter', 'alpha');
|
||||
|
||||
$template = GETPOST('template', 'nohtml');
|
||||
$template = GETPOST('template', 'alphanohtml');
|
||||
$templatename = GETPOST('templatename', 'alpha');
|
||||
$templateid = GETPOST('templateid', 'int');
|
||||
|
||||
|
||||
@ -209,7 +209,7 @@ $found = 0;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DeStockOnBill").'</td>';
|
||||
print '<td class="right">';
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STOCK_CALCULATE_ON_BILL', array(), null, 0, 0, 0, 2, 1);
|
||||
} else {
|
||||
|
||||
@ -174,10 +174,10 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'stock');
|
||||
|
||||
// Configuration header
|
||||
$head = stocktransferAdminPrepareHead();
|
||||
dol_fiche_head($head, 'settings', '', -1, "stocktransfer@stocktransfer");
|
||||
print dol_get_fiche_head($head, 'settings', '', -1, "stocktransfer@stocktransfer");
|
||||
|
||||
// Setup page goes here
|
||||
echo '<span class="opacitymedium">'.$langs->trans("StockTransferSetupPage").'</span>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("StockTransferSetupPage").'</span>';
|
||||
|
||||
|
||||
/*if ($action == 'edit')
|
||||
@ -478,7 +478,7 @@ if (empty($setupnotempty)) {
|
||||
}
|
||||
|
||||
// Page end
|
||||
dol_fiche_end();
|
||||
print dol_get_fiche_end();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -464,8 +464,7 @@ print "</td></tr>\n";
|
||||
|
||||
// Ask for payment bank during supplier order
|
||||
/* Kept as hidden for the moment
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
if (isModEnabled('banque')) {
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">';
|
||||
@ -521,7 +520,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->reception->enabled) {
|
||||
if (isModEnabled('reception')) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("FeatureNotAvailableWithReceptionModule").'</span>';
|
||||
} else {
|
||||
if ($conf->use_javascript_ajax) {
|
||||
|
||||
@ -89,7 +89,7 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') {
|
||||
}
|
||||
}
|
||||
|
||||
$topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'nohtml');
|
||||
$topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'alphanohtml');
|
||||
if (!empty($topic_interface)) {
|
||||
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity);
|
||||
} else {
|
||||
|
||||
@ -189,7 +189,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
$param .= " -U ".$dolibarr_main_db_user;
|
||||
$paramcrypted = $param;
|
||||
$paramclear = $param;
|
||||
/*if (! empty($dolibarr_main_db_pass))
|
||||
/*if (!empty($dolibarr_main_db_pass))
|
||||
{
|
||||
$paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass);
|
||||
$paramclear.=" -p".$dolibarr_main_db_pass;
|
||||
|
||||
@ -95,7 +95,7 @@ $tabfield[1] = "ref,description,virtualhost,position,date_creation";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
$tabfieldvalue = array();
|
||||
$tabfieldvalue[1] = "ref,description,virtualhost,position";
|
||||
$tabfieldvalue[1] = "ref,description,virtualhost,position,entity";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
$tabfieldinsert = array();
|
||||
|
||||
@ -68,7 +68,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
|
||||
'family'=>'create',
|
||||
'position'=>20,
|
||||
'enabled'=>(!empty($conf->commande->enabled) && !empty($conf->facture->enabled)),
|
||||
'enabled'=>(!empty($conf->commande->enabled) && isModEnabled('facture')),
|
||||
'picto'=>'bill'
|
||||
),
|
||||
'WORKFLOW_TICKET_CREATE_INTERVENTION' => array (
|
||||
@ -91,7 +91,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL'=>array(
|
||||
'family'=>'classify_proposal',
|
||||
'position'=>31,
|
||||
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->facture->enabled)),
|
||||
'enabled'=>(!empty($conf->propal->enabled) && isModEnabled('facture')),
|
||||
'picto'=>'propal',
|
||||
'warning'=>''
|
||||
),
|
||||
@ -112,7 +112,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
|
||||
'family'=>'classify_order',
|
||||
'position'=>42,
|
||||
'enabled'=>(!empty($conf->facture->enabled) && !empty($conf->commande->enabled)),
|
||||
'enabled'=>(isModEnabled('facture') && !empty($conf->commande->enabled)),
|
||||
'picto'=>'order',
|
||||
'warning'=>''
|
||||
), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card.
|
||||
@ -165,7 +165,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE' => array(
|
||||
'family' => 'classify_shipping',
|
||||
'position' => 90,
|
||||
'enabled' => ! empty($conf->expedition->enabled) && ! empty($conf->facture->enabled),
|
||||
'enabled' => !empty($conf->expedition->enabled) && !empty($conf->facture->enabled),
|
||||
'picto' => 'shipment'
|
||||
),
|
||||
|
||||
@ -173,13 +173,13 @@ $workflowcodes = array(
|
||||
'WORKFLOW_TICKET_LINK_CONTRACT' => array(
|
||||
'family' => 'link_ticket',
|
||||
'position' => 75,
|
||||
'enabled' => ! empty($conf->ticket->enabled) && ! empty($conf->contract->enabled),
|
||||
'enabled' => !empty($conf->ticket->enabled) && !empty($conf->contract->enabled),
|
||||
'picto' => 'ticket'
|
||||
),
|
||||
'WORKFLOW_TICKET_USE_PARENT_COMPANY_CONTRACTS' => array(
|
||||
'family' => 'link_ticket',
|
||||
'position' => 76,
|
||||
'enabled' => ! empty($conf->ticket->enabled) && ! empty($conf->contract->enabled),
|
||||
'enabled' => !empty($conf->ticket->enabled) && !empty($conf->contract->enabled),
|
||||
'picto' => 'ticket'
|
||||
),
|
||||
);
|
||||
|
||||
@ -179,7 +179,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) {
|
||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create' . $out . '">' . $langs->trans("AddAction") . '</a>';
|
||||
} else {
|
||||
@ -189,7 +189,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
$param = '&id=' . $object->id . '&socid=' . $socid;
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage=' . urlencode($contextpage);
|
||||
|
||||
@ -181,7 +181,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
// if (!empty($conf->agenda->enabled)) {
|
||||
// if (isModEnabled('agenda')) {
|
||||
// if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) {
|
||||
// print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create' . $out . '">' . $langs->trans("AddAction") . '</a>';
|
||||
// } else {
|
||||
@ -191,7 +191,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '</div>';
|
||||
|
||||
// if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
// if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
// $param = '&id=' . $object->id . '&socid=' . $socid;
|
||||
// if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
// $param .= '&contextpage=' . urlencode($contextpage);
|
||||
|
||||
@ -300,7 +300,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Clone
|
||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&token=' . newToken(), '', $permissiontoadd);
|
||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . (!empty($socid) ? '&socid=' . $socid : '') . '&action=clone&token=' . newToken(), '', $permissiontoadd);
|
||||
|
||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
|
||||
|
||||
@ -188,7 +188,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<br>';
|
||||
|
||||
// For thirdparty
|
||||
if ($conf->societe->enabled) {
|
||||
if (isModEnabled('societe')) {
|
||||
$nbno = $nbtotal = 0;
|
||||
|
||||
print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company');
|
||||
|
||||
@ -140,7 +140,7 @@ class BlockedLog
|
||||
|
||||
$this->trackedevents = array();
|
||||
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
|
||||
$this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
|
||||
$this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL';
|
||||
|
||||
@ -150,7 +150,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
if (! empty($conf->project->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
@ -220,7 +220,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
|
||||
} else {
|
||||
@ -230,7 +230,7 @@ if ($object->id > 0) {
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||
$param = '&id='.$object->id.'&socid='.$socid;
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
|
||||
@ -476,7 +476,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
if (! empty($conf->project->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
@ -584,7 +584,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
print mrpCollapseBomManagement();
|
||||
mrpCollapseBomManagement();
|
||||
}
|
||||
|
||||
|
||||
@ -638,7 +638,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
}
|
||||
|
||||
// Create MO
|
||||
if ($conf->mrp->enabled) {
|
||||
if (isModEnabled('mrp')) {
|
||||
if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write)) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/mrp/mo_card.php?action=create&fk_bom='.$object->id.'&token='.newToken().'&backtopageforcancel='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">'.$langs->trans("CreateMO").'</a>'."\n";
|
||||
}
|
||||
|
||||
@ -989,7 +989,7 @@ class Categorie extends CommonObject
|
||||
$categories[$i]['array_options'] = $category_static->array_options;
|
||||
|
||||
// multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (!empty($conf->global->MAIN_MULTILANGS) && isset($category_static->multilangs)) {
|
||||
$categories[$i]['multilangs'] = $category_static->multilangs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1234,7 +1234,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
|
||||
$projectid = GETPOST('projectid', 'int');
|
||||
@ -1737,7 +1737,7 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td>';
|
||||
@ -1762,7 +1762,7 @@ if ($id > 0) {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("LinkedObject").'</td>';
|
||||
|
||||
if ($object->elementtype == 'task' && !empty($conf->projet->enabled)) {
|
||||
if ($object->elementtype == 'task' && !empty($conf->project->enabled)) {
|
||||
print '<td id="project-task-input-container" >';
|
||||
|
||||
$urloption = '?action=create&donotclearsession=1'; // we use create not edit for more flexibility
|
||||
@ -1946,7 +1946,7 @@ if ($id > 0) {
|
||||
// Thirdparty
|
||||
//$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
//$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
$morehtmlref .= $langs->trans('Project').' ';
|
||||
|
||||
@ -1145,8 +1145,16 @@ class ActionComm extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
|
||||
$sql .= " SET percent = '".$this->db->escape($this->percentage)."'";
|
||||
if ($this->type_id > 0) {
|
||||
$sql .= ", fk_action = '".$this->db->escape($this->type_id)."'";
|
||||
$sql .= ", fk_action = ".(int) $this->type_id;
|
||||
if (empty($this->type_code)) {
|
||||
$cactioncomm = new CActionComm($this->db);
|
||||
$result = $cactioncomm->fetch($this->type_id);
|
||||
if ($result >= 0 && !empty($cactioncomm->code)) {
|
||||
$this->type_code = $cactioncomm->code;
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql .= ", code = " . (isset($this->type_code)? "'".$this->db->escape($this->type_code) . "'":"null");
|
||||
$sql .= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "null");
|
||||
$sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null');
|
||||
$sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null');
|
||||
@ -2505,14 +2513,16 @@ class ActionComm extends CommonObject
|
||||
*
|
||||
* @param int $id The id of the event
|
||||
* @param int $percent The new percent value for the event
|
||||
* @param int $usermodid The user who modified the percent
|
||||
* @return int 1 when update of the event was suscessfull, otherwise -1
|
||||
*/
|
||||
public function updatePercent($id, $percent)
|
||||
public function updatePercent($id, $percent, $usermodid = 0)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
|
||||
$sql .= " SET percent = ".(int) $percent;
|
||||
if ($usermodid > 0) $sql .= ", fk_user_mod = ".$usermodid;
|
||||
$sql .= " WHERE id = ".((int) $id);
|
||||
|
||||
if ($this->db->query($sql)) {
|
||||
|
||||
@ -198,7 +198,7 @@ class CActionComm
|
||||
//var_dump($obj->type.' '.$obj->module.' '); var_dump($user->rights->facture->lire);
|
||||
$qualified = 0;
|
||||
// Special cases
|
||||
if ($obj->module == 'invoice' && !empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
if ($obj->module == 'invoice' && isModEnabled('facture') && !empty($user->rights->facture->lire)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if ($obj->module == 'order' && !empty($conf->commande->enabled) && empty($user->rights->commande->lire)) {
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
//$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
//$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
$morehtmlref .= $langs->trans('Project').': ';
|
||||
|
||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
|
||||
@ -848,7 +848,6 @@ if ($resql) {
|
||||
$event->fk_project = $obj->fk_project;
|
||||
|
||||
$event->socid = $obj->fk_soc;
|
||||
$event->thirdparty_id = $obj->fk_soc;
|
||||
$event->contact_id = $obj->fk_contact;
|
||||
|
||||
// Defined date_start_in_calendar and date_end_in_calendar property
|
||||
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -86,7 +86,7 @@ $morehtmlref = '<div class="refidno">';
|
||||
// Thirdparty
|
||||
//$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
//$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
$morehtmlref .= $langs->trans('Project').': ';
|
||||
|
||||
@ -101,7 +101,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
|
||||
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
@ -514,7 +514,6 @@ $s = $newtitle;
|
||||
print $s;
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
|
||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -40,10 +40,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
}
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
|
||||
}
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
@ -77,10 +75,10 @@ if (!empty($conf->commande->enabled)) {
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
$langs->load("sendings");
|
||||
}
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$langs->load("bills");
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
@ -741,7 +739,7 @@ if ($object->id > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
// Box factures
|
||||
$tmp = $object->getOutstandingBills('customer', 0);
|
||||
$outstandingOpened = $tmp['opened'];
|
||||
@ -1311,7 +1309,7 @@ if ($object->id > 0) {
|
||||
/*
|
||||
* Latest invoices templates
|
||||
*/
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
$sql = 'SELECT f.rowid as id, f.titre as ref';
|
||||
$sql .= ', f.total_ht';
|
||||
$sql .= ', f.total_tva';
|
||||
@ -1406,7 +1404,7 @@ if ($object->id > 0) {
|
||||
/*
|
||||
* Latest invoices
|
||||
*/
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
$sql = 'SELECT f.rowid as facid, f.ref, f.type';
|
||||
$sql .= ', f.total_ht';
|
||||
$sql .= ', f.total_tva';
|
||||
@ -1569,7 +1567,7 @@ if ($object->id > 0) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddTrip").'</a></div>';
|
||||
}
|
||||
|
||||
if (!empty($conf->facture->enabled) && $object->status == 1) {
|
||||
if (isModEnabled('facture') && $object->status == 1) {
|
||||
if (empty($user->rights->facture->creer)) {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
|
||||
} else {
|
||||
@ -1597,7 +1595,7 @@ if ($object->id > 0) {
|
||||
}
|
||||
|
||||
// Add action
|
||||
if (!empty($conf->agenda->enabled) && !empty($conf->global->MAIN_REPEATTASKONEACHTAB) && $object->status == 1) {
|
||||
if (isModEnabled('agenda') && !empty($conf->global->MAIN_REPEATTASKONEACHTAB) && $object->status == 1) {
|
||||
if ($user->rights->agenda->myactions->create) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a></div>';
|
||||
} else {
|
||||
|
||||
@ -640,10 +640,10 @@ if ($object->fetch($id) >= 0) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="tdoverflowmax150">'.img_picto('$obj->email', 'email', 'class="paddingright"').$obj->email.'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).'">'.$obj->lastname.'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">'.$obj->firstname.'</td>';
|
||||
print '<td>'.$obj->other.'</td>';
|
||||
print '<td class="tdoverflowmax150">'.img_picto('$obj->email', 'email', 'class="paddingright"').dol_escape_htmltag($obj->email).'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).'">'.dol_escape_htmltag($obj->lastname).'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).'">'.dol_escape_htmltag($obj->firstname).'</td>';
|
||||
print '<td>'.dol_escape_htmltag($obj->other).'</td>';
|
||||
print '<td class="center tdoverflowmax150">';
|
||||
if (empty($obj->source_id) || empty($obj->source_type)) {
|
||||
print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility
|
||||
|
||||
@ -50,7 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -124,7 +124,7 @@ $usercancreateorder = $user->rights->commande->creer;
|
||||
$usercancreateinvoice = $user->rights->facture->creer;
|
||||
$usercancreatecontract = $user->rights->contrat->creer;
|
||||
$usercancreateintervention = $user->hasRight('ficheinter', 'creer');
|
||||
$usercancreatepurchaseorder = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
|
||||
|
||||
$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
@ -696,7 +696,7 @@ if (empty($reshook)) {
|
||||
|
||||
if (
|
||||
!$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on'
|
||||
&& ! empty($deposit_percent_from_payment_terms) && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)
|
||||
&& ! empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer)
|
||||
) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
@ -1522,7 +1522,7 @@ $form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formpropal = new FormPropal($db);
|
||||
$formmargin = new FormMargin($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -1779,7 +1779,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
print '<tr class="field_projectid">';
|
||||
print '<td class="titlefieldcreate">'.$langs->trans("Project").'</td><td class="valuefieldcreate">';
|
||||
@ -2001,7 +2001,7 @@ if ($action == 'create') {
|
||||
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (! empty($deposit_percent_from_payment_terms) && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)) {
|
||||
if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && ! empty($user->rights->facture->creer)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$object->fetchObjectLinked();
|
||||
@ -2211,7 +2211,7 @@ if ($action == 'create') {
|
||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherProposals").'</a>)';
|
||||
}
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br><span class="paddingrightonly">'.$langs->trans('Project').'</span>';
|
||||
if ($usercancreate) {
|
||||
@ -2801,7 +2801,7 @@ if ($action == 'create') {
|
||||
|
||||
// Create an invoice and classify billed
|
||||
if ($object->statut == Propal::STATUS_SIGNED && empty($conf->global->PROPOSAL_ARE_NOT_BILLABLE)) {
|
||||
if (!empty($conf->facture->enabled) && $usercancreateinvoice) {
|
||||
if (isModEnabled('facture') && $usercancreateinvoice) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ class Propal extends CommonObject
|
||||
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>22),
|
||||
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>40),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'position'=>23),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->projet->enabled', 'visible'=>-1, 'position'=>24),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>24),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
|
||||
'datep' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
|
||||
@ -1367,7 +1367,7 @@ class Propal extends CommonObject
|
||||
$object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$object->fk_delivery_address = '';
|
||||
|
||||
/*if (!empty($conf->projet->enabled))
|
||||
/*if (!empty($conf->project->enabled))
|
||||
{
|
||||
$project = new Project($db);
|
||||
if ($this->fk_project > 0 && $project->fetch($this->fk_project)) {
|
||||
|
||||
@ -137,7 +137,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->propal->creer) {
|
||||
|
||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->propal->creer) {
|
||||
|
||||
@ -28,7 +28,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_cl
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->propal->creer) {
|
||||
|
||||
@ -204,8 +204,8 @@ $checkedtypetiers = 0;
|
||||
$arrayfields = array(
|
||||
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
|
||||
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1),
|
||||
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
|
||||
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)),
|
||||
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1)),
|
||||
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1)),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1),
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ if ($object->id > 0) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->propal->creer) {
|
||||
|
||||
@ -169,7 +169,7 @@ print '</div><div class="fichetwothirdright">';
|
||||
/*
|
||||
* Actions commerciales a faire
|
||||
*/
|
||||
if (!empty($conf->agenda->enabled)) {
|
||||
if (isModEnabled('agenda')) {
|
||||
show_array_actions_to_do(10);
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("companies");
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$langs->load("bills");
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -1492,7 +1492,7 @@ $form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formorder = new FormOrder($db);
|
||||
$formmargin = new FormMargin($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -1753,10 +1753,9 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
|
||||
// Shipping Method
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled('expedition')) {
|
||||
print '<tr><td>'.$langs->trans('SendingMethod').'</td><td>';
|
||||
print img_picto('', 'object_dolly', 'class="pictofixedwidth"');
|
||||
print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print img_picto('', 'object_dolly', 'class="pictofixedwidth"').$form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1778,7 +1777,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Project").'</td><td>';
|
||||
@ -2246,7 +2245,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)';
|
||||
}
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($usercancreate) {
|
||||
@ -2383,7 +2382,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
print '</td></tr>';
|
||||
|
||||
// Shipping Method
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled('expedition')) {
|
||||
print '<tr><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("SendingMethod", 'shippingmethod', '', $object, $editenable);
|
||||
@ -2758,11 +2757,11 @@ if ($action == 'create' && $usercancreate) {
|
||||
|
||||
// Ship
|
||||
$numshipping = 0;
|
||||
if (!empty($conf->expedition->enabled)) {
|
||||
if (isModEnabled('expedition')) {
|
||||
$numshipping = $object->nb_expedition();
|
||||
|
||||
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) {
|
||||
if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->delivery_note->enabled && $user->rights->expedition->delivery->creer)) {
|
||||
if ((isModEnabled('expedition_bon') && $user->rights->expedition->creer) || ($conf->delivery_note->enabled && $user->rights->expedition->delivery->creer)) {
|
||||
if ($user->rights->expedition->creer) {
|
||||
print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, '');
|
||||
} else {
|
||||
@ -2782,7 +2781,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
// Create bill and Classify billed
|
||||
// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
|
||||
if ($object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) {
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) {
|
||||
print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&token='.newToken().'&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, '');
|
||||
}
|
||||
if ($usercancreate && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) {
|
||||
|
||||
@ -314,7 +314,7 @@ class Commande extends CommonOrder
|
||||
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>27), // deprecated
|
||||
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>28),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'visible'=>-1, 'notnull'=>1, 'position'=>20),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>'$conf->projet->enabled', 'visible'=>-1, 'position'=>25),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>25),
|
||||
'date_commande' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>1, 'position'=>60),
|
||||
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>62),
|
||||
'date_cloture' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
|
||||
@ -2123,9 +2123,9 @@ class Commande extends CommonOrder
|
||||
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc;
|
||||
$line->product_tosell = $objp->product_tosell;
|
||||
$line->product_tobuy = $objp->product_tobuy;
|
||||
$line->product_desc = $objp->product_desc;
|
||||
$line->product_tobatch = $objp->product_tobatch;
|
||||
$line->product_barcode = $objp->product_barcode;
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->commande->creer) {
|
||||
|
||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->commande->creer) {
|
||||
|
||||
@ -27,7 +27,7 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_cl
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->commande->creer) {
|
||||
|
||||
@ -165,8 +165,8 @@ $checkedtypetiers = 0;
|
||||
$arrayfields = array(
|
||||
'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5),
|
||||
'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>25),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>20),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>25),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35),
|
||||
@ -1821,8 +1821,9 @@ if ($resql) {
|
||||
$total_ht = 0;
|
||||
$total_margin = 0;
|
||||
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
$last_num = min($num, $limit);
|
||||
while ($i < $last_num) {
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$notshippable = 0;
|
||||
@ -1928,7 +1929,7 @@ if ($resql) {
|
||||
print $getNomUrl_cache[$obj->socid];
|
||||
|
||||
// If module invoices enabled and user with invoice creation permissions
|
||||
if (!empty($conf->facture->enabled) && !empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) {
|
||||
if (isModEnabled('facture') && !empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) {
|
||||
if ($user->rights->facture->creer) {
|
||||
if (($obj->fk_statut > 0 && $obj->fk_statut < 3) || ($obj->fk_statut == 3 && $obj->billed == 0)) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$companystatic->id.'&search_billed=0&autoselectall=1">';
|
||||
@ -2457,6 +2458,17 @@ if ($resql) {
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
// If no record found
|
||||
if ($num == 0) {
|
||||
$colspan = 1;
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->commande->creer) {
|
||||
|
||||
@ -127,7 +127,7 @@ if (empty($entity)) {
|
||||
$error = 0;
|
||||
|
||||
$listofchoices = array(
|
||||
'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills', 'enabled' => !empty($conf->facture->enabled), 'perms' => !empty($user->rights->facture->lire)),
|
||||
'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills', 'enabled' => isModEnabled('facture'), 'perms' => !empty($user->rights->facture->lire)),
|
||||
'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills', 'enabled' => !empty($conf->supplier_invoice->enabled), 'perms' => !empty($user->rights->fournisseur->facture->lire)),
|
||||
'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips', 'enabled' => !empty($conf->expensereport->enabled), 'perms' => !empty($user->rights->expensereport->lire)),
|
||||
'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation', 'enabled' => !empty($conf->don->enabled), 'perms' => !empty($user->rights->don->lire)),
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -78,6 +78,9 @@ if (!empty($ref)) {
|
||||
$id = $object->id;
|
||||
}
|
||||
|
||||
$annee = '';
|
||||
$totentrees = array();
|
||||
$totsorties = array();
|
||||
|
||||
// Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture)
|
||||
// plutot que sur llx_paiement + llx_paiementfourn
|
||||
@ -192,14 +195,14 @@ for ($mois = 1; $mois < 13; $mois++) {
|
||||
$case = sprintf("%04s-%02s", $annee, $mois);
|
||||
|
||||
print '<td class="right" width="10%"> ';
|
||||
if ($decaiss[$case] > 0) {
|
||||
if (isset($decaiss[$case]) && $decaiss[$case] > 0) {
|
||||
print price($decaiss[$case]);
|
||||
$totsorties[$annee] += $decaiss[$case];
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print '<td class="right borderrightlight" width="10%"> ';
|
||||
if ($encaiss[$case] > 0) {
|
||||
if (isset($encaiss[$case]) && $encaiss[$case] > 0) {
|
||||
print price($encaiss[$case]);
|
||||
$totentrees[$annee] += $encaiss[$case];
|
||||
}
|
||||
@ -211,7 +214,8 @@ for ($mois = 1; $mois < 13; $mois++) {
|
||||
// Total debit-credit
|
||||
print '<tr class="liste_total"><td><b>'.$langs->trans("Total")."</b></td>";
|
||||
for ($annee = $year_start; $annee <= $year_end; $annee++) {
|
||||
print '<td class="right nowraponall"><b>'.price($totsorties[$annee]).'</b></td><td class="right nowraponall"><b>'.price($totentrees[$annee]).'</b></td>';
|
||||
print '<td class="right nowraponall"><b>'. (isset($totsorties[$annee]) ? price($totsorties[$annee]) : '') .'</b></td>';
|
||||
print '<td class="right nowraponall"><b>'. (isset($totentrees[$annee]) ? price($totentrees[$annee]) : '') .'</b></td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
@ -245,6 +249,7 @@ if ($resql) {
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
$nbcol = '';
|
||||
print '<tr class="liste_total"><td><b>'.$langs->trans("CurrentBalance")."</b></td>";
|
||||
print '<td colspan="'.($nbcol).'" class="right">'.price($balance).'</td>';
|
||||
print "</tr>\n";
|
||||
@ -267,7 +272,7 @@ if ($result < 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
if ($id && $_GET["option"] != 'all') {
|
||||
if ($id && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($id).")";
|
||||
}
|
||||
|
||||
@ -299,7 +304,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".($year - $annee)."-01-01 00:00:00'";
|
||||
$sql .= " AND b.datev <= '".($year - $annee)."-12-31 23:59:59'";
|
||||
$sql .= " AND b.amount > 0";
|
||||
if ($id && $_GET["option"] != 'all') {
|
||||
if ($id && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($id).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%m');";
|
||||
@ -381,7 +386,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".($year - $annee)."-01-01 00:00:00'";
|
||||
$sql .= " AND b.datev <= '".($year - $annee)."-12-31 23:59:59'";
|
||||
$sql .= " AND b.amount < 0";
|
||||
if ($id && $_GET["option"] != 'all') {
|
||||
if ($id && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($id).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%m');";
|
||||
|
||||
@ -125,11 +125,11 @@ if (empty($reshook)) {
|
||||
$object->cle_rib = trim(GETPOST("cle_rib"));
|
||||
$object->bic = trim(GETPOST("bic"));
|
||||
$object->iban = trim(GETPOST("iban"));
|
||||
$object->domiciliation = trim(GETPOST("domiciliation", "nohtml"));
|
||||
$object->domiciliation = trim(GETPOST("domiciliation", "alphanohtml"));
|
||||
$object->pti_in_ctti = empty(GETPOST("pti_in_ctti")) ? 0 : 1;
|
||||
|
||||
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'nohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
|
||||
|
||||
$object->ics = trim(GETPOST("ics", 'alpha'));
|
||||
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
|
||||
@ -226,11 +226,11 @@ if (empty($reshook)) {
|
||||
$object->cle_rib = trim(GETPOST("cle_rib"));
|
||||
$object->bic = trim(GETPOST("bic"));
|
||||
$object->iban = trim(GETPOST("iban"));
|
||||
$object->domiciliation = trim(GETPOST("domiciliation", "nohtml"));
|
||||
$object->domiciliation = trim(GETPOST("domiciliation", "alphanohtml"));
|
||||
$object->pti_in_ctti = empty(GETPOST("pti_in_ctti")) ? 0 : 1;
|
||||
|
||||
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'nohtml'));
|
||||
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
|
||||
|
||||
$object->ics = trim(GETPOST("ics", 'alpha'));
|
||||
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
|
||||
@ -458,7 +458,7 @@ if ($action == 'create') {
|
||||
print '<td>';
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ?GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ?GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -541,7 +541,7 @@ if ($action == 'create') {
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td><input maxlength="11" type="text" class="flat minwidth150" name="bic" value="'.(GETPOST('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
|
||||
|
||||
if ($conf->paymentbybanktransfer->enabled) {
|
||||
if (isModEnabled('paymentbybanktransfer')) {
|
||||
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>';
|
||||
print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'. (empty(GETPOST('pti_in_ctti')) ? '' : ' checked ') . '> ';
|
||||
print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info');
|
||||
@ -778,14 +778,14 @@ if ($action == 'create') {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->prelevement->enabled) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||
print '<td>'.$object->ics.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// TODO ICS is not used with bank transfer !
|
||||
if ($conf->paymentbybanktransfer->enabled) {
|
||||
if (isModEnabled('paymentbybanktransfer')) {
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||
print '<td>'.$object->ics_transfer.'</td>';
|
||||
print '</tr>';
|
||||
@ -1083,12 +1083,12 @@ if ($action == 'create') {
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>';
|
||||
|
||||
if (!empty($conf->prelevement->enabled)) {
|
||||
if (isModEnabled('prelevement')) {
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.(GETPOSTISSET('ics') ? GETPOST('ics', 'alphanohtml') : $object->ics).'"></td></tr>';
|
||||
}
|
||||
|
||||
if (!empty($conf->paymentbybanktransfer->enabled)) {
|
||||
if (!empty(isModEnabled('paymentbybanktransfer'))) {
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
|
||||
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ if ($action != 'edit') {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td><td><input name="label" type="text" class="maxwidth100"></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center"><input type="submit" name="add" class="button button-add" value="'.$langs->trans("Add").'"></td>';
|
||||
print '<td class="center"><input type="submit" name="add" class="button button-add small" value="'.$langs->trans("Add").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -145,6 +145,12 @@ class Account extends CommonObject
|
||||
*/
|
||||
public $iban_prefix;
|
||||
|
||||
/**
|
||||
* Address of the bank
|
||||
* @var string
|
||||
*/
|
||||
public $domiciliation;
|
||||
|
||||
/**
|
||||
* XML SEPA format: place Payment Type Information (PmtTpInf) in Credit Transfer Transaction Information (CdtTrfTxInf)
|
||||
* @var int
|
||||
@ -1200,7 +1206,7 @@ class Account extends CommonObject
|
||||
* Return current sold
|
||||
*
|
||||
* @param int $option 1=Exclude future operation date (this is to exclude input made in advance and have real account sold)
|
||||
* @param tms $date_end Date until we want to get bank account sold
|
||||
* @param int $date_end Date until we want to get bank account sold
|
||||
* @param string $field dateo or datev
|
||||
* @return int current sold (value date <= today)
|
||||
*/
|
||||
|
||||
@ -95,7 +95,7 @@ if ($result < 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ if ($result < 0) {
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'";
|
||||
$sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%Y%m%d')";
|
||||
@ -165,7 +165,7 @@ if ($result < 0) {
|
||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
$sql .= " AND b.datev < '".$db->escape($year)."-".sprintf("%02s", $month)."-01'";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ if ($result < 0) {
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'";
|
||||
$sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%Y%m%d')";
|
||||
@ -307,7 +307,7 @@ if ($result < 0) {
|
||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
$sql .= " AND b.datev < '".$db->escape($year)."-01-01'";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ if ($result < 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%Y%m%d')";
|
||||
@ -540,7 +540,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'";
|
||||
$sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'";
|
||||
$sql .= " AND b.amount > 0";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%d')";
|
||||
@ -575,7 +575,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'";
|
||||
$sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'";
|
||||
$sql .= " AND b.amount < 0";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%d')";
|
||||
@ -649,7 +649,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'";
|
||||
$sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'";
|
||||
$sql .= " AND b.amount > 0";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%m');";
|
||||
@ -676,7 +676,7 @@ if ($result < 0) {
|
||||
$sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'";
|
||||
$sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'";
|
||||
$sql .= " AND b.amount < 0";
|
||||
if ($account && $_GET["option"] != 'all') {
|
||||
if ($account && GETPOST("option") != 'all') {
|
||||
$sql .= " AND b.fk_account IN (".$db->sanitize($account).")";
|
||||
}
|
||||
$sql .= " GROUP BY date_format(b.datev,'%m')";
|
||||
@ -748,7 +748,7 @@ if ($account) {
|
||||
if (!preg_match('/,/', $account)) {
|
||||
$moreparam = '&month='.$month.'&year='.$year.($mode == 'showalltime' ? '&mode=showalltime' : '');
|
||||
|
||||
if ($_GET["option"] != 'all') {
|
||||
if (GETPOST("option") != 'all') {
|
||||
$morehtml = '<a href="'.$_SERVER["PHP_SELF"].'?account='.$account.'&option=all'.$moreparam.'">'.$langs->trans("ShowAllAccounts").'</a>';
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam, 0, '', '', 1);
|
||||
} else {
|
||||
|
||||
@ -550,7 +550,7 @@ foreach ($accounts as $key => $type) {
|
||||
|
||||
// Account type
|
||||
if (!empty($arrayfields['accountype']['checked'])) {
|
||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
|
||||
print $objecttmp->type_lib[$objecttmp->type];
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2017 Patrick Delcroix <pmpdelcroix@gmail.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2017 Patrick Delcroix <pmpdelcroix@gmail.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -57,6 +58,8 @@ $ve = GETPOST("ve", 'alpha');
|
||||
$brref = GETPOST('brref', 'alpha');
|
||||
$oldbankreceipt = GETPOST('oldbankreceipt', 'alpha');
|
||||
$newbankreceipt = GETPOST('newbankreceipt', 'alpha');
|
||||
$rel = GETPOST("rel", 'alphanohtml');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
// Security check
|
||||
$fieldid = (!empty($ref) ? $ref : $id);
|
||||
@ -112,7 +115,7 @@ $contextpage = 'banktransactionlist'.(empty($object->ref) ? '' : '-'.$object->id
|
||||
|
||||
// Define number of receipt to show (current, previous or next one ?)
|
||||
$found = false;
|
||||
if ($_GET["rel"] == 'prev') {
|
||||
if ($rel == 'prev') {
|
||||
// Recherche valeur pour num = numero releve precedent
|
||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
@ -130,7 +133,7 @@ if ($_GET["rel"] == 'prev') {
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
} elseif ($_GET["rel"] == 'next') {
|
||||
} elseif ($rel == 'next') {
|
||||
// Recherche valeur pour num = numero releve precedent
|
||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
@ -237,10 +240,10 @@ if (empty($numref)) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
$totalnboflines = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
$totalnboflines = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($conf->liste_limit + 1, $offset);
|
||||
@ -399,9 +402,8 @@ if (empty($numref)) {
|
||||
|
||||
$title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
|
||||
print load_fiche_titre($title, $morehtmlright, '');
|
||||
//print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'bank_account', 0, '', '', 0, 1);
|
||||
|
||||
print "<form method=\"post\" action=\"releve.php\">";
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com
|
||||
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com
|
||||
* Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -185,7 +185,7 @@ if (GETPOST("account") || GETPOST("ref")) {
|
||||
|
||||
|
||||
$solde = $object->solde(0);
|
||||
if ($conf->global->MULTICOMPANY_INVOICE_SHARING_ENABLED) {
|
||||
if (getDolGlobalInt('MULTICOMPANY_INVOICE_SHARING_ENABLED')) {
|
||||
$colspan = 6;
|
||||
} else {
|
||||
$colspan = 5;
|
||||
@ -199,7 +199,7 @@ if (GETPOST("account") || GETPOST("ref")) {
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("DateDue").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
if ($conf->global->MULTICOMPANY_INVOICE_SHARING_ENABLED) {
|
||||
if (getDolGlobalInt('MULTICOMPANY_INVOICE_SHARING_ENABLED')) {
|
||||
print '<td>'.$langs->trans("Entity").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
|
||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -311,7 +311,7 @@ $form = new Form($db);
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$formaccounting = new FormAccounting($db);
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
// Associated project
|
||||
@ -553,7 +553,7 @@ if ($id) {
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= $langs->trans('Project').' ';
|
||||
if ($user->rights->banque->modifier) {
|
||||
|
||||
@ -97,7 +97,7 @@ if ($object->id) {
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= $langs->trans('Project').' : ';
|
||||
if ($user->rights->banque->modifier && 0) {
|
||||
|
||||
@ -57,7 +57,7 @@ print dol_get_fiche_head($head, 'info', $langs->trans("VariousPayment"), -1, $ob
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= $langs->trans('Project').' : ';
|
||||
if ($user->rights->banque->modifier && 0) {
|
||||
|
||||
@ -161,7 +161,7 @@ $arrayfields = array(
|
||||
'datep' =>array('label'=>"DatePayment", 'checked'=>1, 'position'=>120),
|
||||
'datev' =>array('label'=>"DateValue", 'checked'=>-1, 'position'=>130),
|
||||
'type' =>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>140),
|
||||
'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>!empty($conf->projet->enabled)),
|
||||
'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>!empty($conf->project->enabled)),
|
||||
'bank' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>300, "enabled"=>!empty($conf->banque->enabled)),
|
||||
'entry' =>array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>310, "enabled"=>!empty($conf->banque->enabled)),
|
||||
'account' =>array('label'=>"AccountAccountingShort", 'checked'=>1, 'position'=>400, "enabled"=>!empty($conf->accounting->enabled)),
|
||||
|
||||
@ -29,7 +29,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load('projects');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
|
||||
@ -34,7 +34,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -201,12 +201,12 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$object->titre = GETPOST('title', 'nohtml'); // deprecated
|
||||
$object->title = GETPOST('title', 'nohtml');
|
||||
$object->titre = GETPOST('title', 'alphanohtml'); // deprecated
|
||||
$object->title = GETPOST('title', 'alphanohtml');
|
||||
$object->note_private = GETPOST('note_private', 'restricthtml');
|
||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||
$object->model_pdf = GETPOST('modelpdf', 'alpha');
|
||||
$object->usenewprice = GETPOST('usenewprice', 'alpha');
|
||||
$object->model_pdf = GETPOST('modelpdf', 'alphanohtml');
|
||||
$object->usenewprice = GETPOST('usenewprice', 'alphanohtml');
|
||||
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
||||
@ -924,7 +924,7 @@ llxHeader('', $langs->trans("RepeatableInvoices"), $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
$companystatic = new Societe($db);
|
||||
@ -954,7 +954,7 @@ if ($action == 'create') {
|
||||
print dol_get_fiche_head(null, '', '', 0);
|
||||
|
||||
$rowspan = 4;
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$rowspan++;
|
||||
}
|
||||
if ($object->fk_account > 0) {
|
||||
@ -1047,7 +1047,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0) {
|
||||
if (!empty($conf->project->enabled) && is_object($object->thirdparty) && $object->thirdparty->id > 0) {
|
||||
$projectid = GETPOST('projectid') ?GETPOST('projectid') : $object->fk_project;
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td>';
|
||||
@ -1203,7 +1203,7 @@ if ($action == 'create') {
|
||||
// Thirdparty
|
||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->facture->creer) {
|
||||
|
||||
@ -54,7 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
if (!empty($conf->commande->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -2874,7 +2874,7 @@ $formmargin = new FormMargin($db);
|
||||
$soc = new Societe($db);
|
||||
$paymentstatic = new Paiement($db);
|
||||
$bankaccountstatic = new Account($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -3658,7 +3658,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
|
||||
@ -4284,7 +4284,7 @@ if ($action == 'create') {
|
||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
||||
}
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($usercancreate) {
|
||||
@ -4803,7 +4803,7 @@ if ($action == 'create') {
|
||||
|
||||
$nbrows = 8;
|
||||
$nbcols = 3;
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$nbrows++;
|
||||
}
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
|
||||
@ -181,7 +181,7 @@ class FactureRec extends CommonInvoice
|
||||
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total', 'enabled'=>1, 'visible'=>-1, 'position'=>70, 'isameasure'=>1),
|
||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>75, 'isameasure'=>1),
|
||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->projet->enabled', 'visible'=>-1, 'position'=>85),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>85),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
|
||||
'date_lim_reglement' =>array('type'=>'date', 'label'=>'Date lim reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
|
||||
|
||||
@ -5415,7 +5415,7 @@ class Facture extends CommonInvoice
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
if (empty($conf->facture->enabled)) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
if (!isModEnabled('facture')) { // Should not happen. If module disabled, cron job should not be visible.
|
||||
$this->output .= $langs->trans('ModuleNotEnabled', $langs->transnoentitiesnoconv("Facture"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -172,9 +172,10 @@ class PaymentTerm // extends CommonObject
|
||||
* Load object in memory from database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $code Code object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetch($id)
|
||||
public function fetch($id, $code = '')
|
||||
{
|
||||
global $langs;
|
||||
$sql = "SELECT";
|
||||
@ -192,7 +193,12 @@ class PaymentTerm // extends CommonObject
|
||||
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_payment_term as t";
|
||||
$sql .= " WHERE t.rowid = ".((int) $id);
|
||||
if ($id) {
|
||||
$sql .= " WHERE t.rowid = ".((int) $id);
|
||||
}
|
||||
if ($code) {
|
||||
$sql .= " WHERE t.code='".$this->db->escape($code)."' AND t.entity IN (".getEntity('payment_term').")";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->facture->creer) {
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->facture->creer) {
|
||||
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_cl
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->facture->creer) {
|
||||
|
||||
@ -257,7 +257,7 @@ llxHeader('', $langs->trans("RepeatableInvoices"), 'ch-facture.html#s-fac-factur
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
$companystatic = new Societe($db);
|
||||
|
||||
@ -215,8 +215,8 @@ $arrayfields = array(
|
||||
'f.date_valid'=>array('label'=>"DateValidation", 'checked'=>0, 'position'=>22),
|
||||
'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1, 'position'=>25),
|
||||
'f.date_closing'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>30),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>40),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>41),
|
||||
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>40),
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>41),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55),
|
||||
|
||||
@ -29,7 +29,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->facture->creer) {
|
||||
|
||||
@ -349,7 +349,7 @@ if ($object->id > 0) {
|
||||
}
|
||||
}
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($usercancreate) {
|
||||
|
||||
@ -104,17 +104,24 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
print getNumberInvoicesPieChart('customers');
|
||||
print '<br>';
|
||||
print getNumberInvoicesPieChart('fourn');
|
||||
print '<br>';
|
||||
|
||||
if (!empty($conf->fournisseur->enabled)) {
|
||||
print getNumberInvoicesPieChart('fourn');
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
print getCustomerInvoiceDraftTable($max, $socid);
|
||||
print '<br>';
|
||||
print getDraftSupplierTable($max, $socid);
|
||||
|
||||
if (!empty($conf->fournisseur->enabled)) {
|
||||
print '<br>';
|
||||
print getDraftSupplierTable($max, $socid);
|
||||
}
|
||||
|
||||
print '</div><div class="fichetwothirdright">';
|
||||
|
||||
|
||||
// Latest modified customer invoices
|
||||
if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
|
||||
if (isModEnabled('facture') && !empty($user->rights->facture->lire)) {
|
||||
$langs->load("boxes");
|
||||
$tmpinvoice = new Facture($db);
|
||||
|
||||
@ -575,7 +582,7 @@ if (!empty($conf->tax->enabled) && !empty($user->rights->tax->charges->lire)) {
|
||||
/*
|
||||
* Customers orders to be billed
|
||||
*/
|
||||
if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) {
|
||||
if (isModEnabled('facture') && !empty($conf->commande->enabled) && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) {
|
||||
$commandestatic = new Commande($db);
|
||||
$langs->load("orders");
|
||||
|
||||
|
||||
@ -159,11 +159,11 @@ if ($resql) {
|
||||
$thirdpartystatic->idprof5 = $obj->idprof5;
|
||||
$thirdpartystatic->idprof6 = $obj->idprof6;
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven"><td class="nowraponall">';
|
||||
print $invoicestatic->getNomUrl(1, 'withdraw');
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print $thirdpartystatic->getNomUrl(1, 'supplier');
|
||||
print '</td>';
|
||||
|
||||
@ -226,14 +226,14 @@ if ($result) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td>";
|
||||
print '<td class="nowraponall">';
|
||||
$bprev->id = $obj->rowid;
|
||||
$bprev->ref = $obj->ref;
|
||||
$bprev->statut = $obj->statut;
|
||||
print $bprev->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec), "dayhour")."</td>\n";
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
print '<td class="right"><span class="amount">'.$bprev->getLibStatut(3)."</span></td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -185,18 +185,18 @@ if ($id > 0 || $ref) {
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
if ($object->date_trans <> 0) {
|
||||
if (!empty($object->date_trans)) {
|
||||
$muser = new User($db);
|
||||
$muser->fetch($object->user_trans);
|
||||
|
||||
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
|
||||
print dol_print_date($object->date_trans, 'day');
|
||||
print ' <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getNomUrl(-1).'</td></tr>';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("By").'</span> '.$muser->getNomUrl(-1).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
|
||||
print $object->methodes_trans[$object->method_trans];
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($object->date_credit <> 0) {
|
||||
if (!empty($object->date_credit)) {
|
||||
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
|
||||
print dol_print_date($object->date_credit, 'day');
|
||||
print '</td></tr>';
|
||||
@ -290,7 +290,7 @@ if ($id > 0 || $ref) {
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
if (!empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action == 'setcredited') {
|
||||
if (!empty($object->date_trans) && empty($object->date_credit) && $user->rights->prelevement->bons->credit && $action == 'setcredited') {
|
||||
$btnLabel = ($object->type == 'bank-transfer') ? $langs->trans("ClassDebited") : $langs->trans("ClassCredited");
|
||||
print '<form name="infocredit" method="post" action="card.php?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -318,8 +318,7 @@ if ($id > 0 || $ref) {
|
||||
if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send);
|
||||
else print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send);
|
||||
}
|
||||
|
||||
if (!empty($object->date_trans) && $object->date_credit == 0) {
|
||||
if (!empty($object->date_trans) && empty($object->date_credit)) {
|
||||
if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("ClassDebited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit);
|
||||
else print dolGetButtonAction($langs->trans("ClassCredited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit);
|
||||
}
|
||||
|
||||
@ -1488,7 +1488,7 @@ class BonPrelevement extends CommonObject
|
||||
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
||||
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
||||
fputs($this->file, ' <InitgPty>'.$CrLf);
|
||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf);
|
||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf);
|
||||
fputs($this->file, ' <Id>'.$CrLf);
|
||||
fputs($this->file, ' <PrvtId>'.$CrLf);
|
||||
fputs($this->file, ' <Othr>'.$CrLf);
|
||||
@ -1604,7 +1604,7 @@ class BonPrelevement extends CommonObject
|
||||
fputs($this->file, ' <NbOfTxs>'.$i.'</NbOfTxs>'.$CrLf);
|
||||
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
||||
fputs($this->file, ' <InitgPty>'.$CrLf);
|
||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf);
|
||||
fputs($this->file, ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf);
|
||||
fputs($this->file, ' <Id>'.$CrLf);
|
||||
fputs($this->file, ' <PrvtId>'.$CrLf);
|
||||
fputs($this->file, ' <Othr>'.$CrLf);
|
||||
@ -1854,16 +1854,16 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR .= ' </FinInstnId>'.$CrLf;
|
||||
$XML_DEBITOR .= ' </DbtrAgt>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom)))).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
||||
if (trim($addressline1)) {
|
||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline1), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
if (trim($addressline2)) {
|
||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline2), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
$XML_DEBITOR .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .= ' </Dbtr>'.$CrLf;
|
||||
@ -1923,16 +1923,16 @@ class BonPrelevement extends CommonObject
|
||||
$XML_CREDITOR .= ' </FinInstnId>'.$CrLf;
|
||||
$XML_CREDITOR .= ' </CdtrAgt>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <Cdtr>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom)))).'</Nm>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||
$addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
$addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""));
|
||||
if (trim($addressline1)) {
|
||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline1), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
if (trim($addressline2)) {
|
||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline2), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
$XML_CREDITOR .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_CREDITOR .= ' </Cdtr>'.$CrLf;
|
||||
@ -2096,16 +2096,16 @@ class BonPrelevement extends CommonObject
|
||||
$XML_SEPA_INFO .= ' </PmtTpInf>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <ReqdColltnDt>'.$dateTime_ETAD.'</ReqdColltnDt>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Cdtr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
if ($addressline1) {
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline1), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
if ($addressline2) {
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline2), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </Cdtr>'.$CrLf;
|
||||
@ -2120,11 +2120,11 @@ class BonPrelevement extends CommonObject
|
||||
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </CdtrAgt>'.$CrLf;
|
||||
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>').$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS))).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
||||
@ -2162,16 +2162,16 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
$XML_SEPA_INFO .= ' <ReqdExctnDt>'.dol_print_date($dateTime_ETAD, 'dayrfc').'</ReqdExctnDt>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Dbtr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||
$addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
$addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""));
|
||||
if ($addressline1) {
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline1), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
if ($addressline2) {
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent($addressline2), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2)), 70, 'right', 'UTF-8', 1)).'</AdrLine>'.$CrLf;
|
||||
}
|
||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </Dbtr>'.$CrLf;
|
||||
@ -2186,11 +2186,11 @@ class BonPrelevement extends CommonObject
|
||||
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </DbtrAgt>'.$CrLf;
|
||||
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($this->raison_sociale))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Nm>'.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).'</Nm>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS))).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' <AdrLine>'.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN)).'</AdrLine>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf; // Field "Responsible of fees". Must be SLEV
|
||||
|
||||
@ -159,11 +159,11 @@ if ($resql) {
|
||||
$thirdpartystatic->idprof5 = $obj->idprof5;
|
||||
$thirdpartystatic->idprof6 = $obj->idprof6;
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven"><td class="nowraponall">';
|
||||
print $invoicestatic->getNomUrl(1, 'withdraw');
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print $thirdpartystatic->getNomUrl(1, 'customer');
|
||||
print '</td>';
|
||||
|
||||
@ -225,17 +225,17 @@ if ($result) {
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td>";
|
||||
$bprev->id = $obj->rowid;
|
||||
$bprev->ref = $obj->ref;
|
||||
$bprev->statut = $obj->statut;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td class="nowraponall">';
|
||||
print $bprev->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec), "dayhour")."</td>\n";
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
print '<td class="right nowraponall"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
print '<td class="right">'.$bprev->getLibStatut(3)."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("companies");
|
||||
if (!empty($conf->facture->enabled)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$langs->load("bills");
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ if ($id > 0) {
|
||||
dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom', '', '', 0, '', '', 1);
|
||||
print dol_get_fiche_end();
|
||||
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
// Invoice list
|
||||
print load_fiche_titre($langs->trans("CustomerPreview"));
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') {
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (isModEnabled('facture') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -269,7 +269,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod
|
||||
// Nothing from this table
|
||||
}
|
||||
|
||||
if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (isModEnabled('facture') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
// On ajoute les paiements clients anciennes version, non lies par paiement_facture
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
$sql = "SELECT sum(p.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm";
|
||||
@ -324,7 +324,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
|
||||
if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (isModEnabled('facture') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -332,7 +332,7 @@ $form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formsocialcontrib = new FormSocialContrib($db);
|
||||
$bankaccountstatic = new Account($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ if ($action == 'create') {
|
||||
print '<td>'.img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($fk_user, 'userid', 1).'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
// Associated project
|
||||
@ -539,7 +539,7 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||
if ($user->rights->tax->charges->creer) {
|
||||
|
||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -101,7 +101,7 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) {
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ if ($object->id) {
|
||||
$morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
|
||||
if (!empty($object->fk_project)) {
|
||||
|
||||
@ -25,7 +25,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -68,7 +68,7 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) {
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ $morehtmlref = '<div class="refidno">';
|
||||
$morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
|
||||
if (!empty($object->fk_project)) {
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ $arrayfields = array(
|
||||
'cs.fk_type' =>array('label'=>"Type", 'checked'=>1, 'position'=>30),
|
||||
'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>40),
|
||||
'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50),
|
||||
'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->projet->enabled))),
|
||||
'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->project->enabled))),
|
||||
'cs.fk_user' =>array('label'=>"Employee", 'checked'=>1, 'position'=>70),
|
||||
'cs.fk_mode_reglement' =>array('checked'=>-1, 'position'=>80, 'label'=>"DefaultPaymentMode"),
|
||||
'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>100),
|
||||
@ -191,7 +191,7 @@ $formother = new FormOther($db);
|
||||
$bankstatic = new Account($db);
|
||||
$formsocialcontrib = new FormSocialContrib($db);
|
||||
$chargesociale_static = new ChargeSociales($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$projectstatic = new Project($db);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ llxHeader('', $langs->trans("SocialContributions"));
|
||||
|
||||
$sql = "SELECT cs.rowid, cs.fk_type as type, cs.fk_user,";
|
||||
$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode, cs.fk_account,";
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
|
||||
}
|
||||
$sql .= " c.libelle as type_label, c.accountancy_code as type_accountancy_code,";
|
||||
@ -209,7 +209,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON (cs.fk_account = ba.rowid)";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pay ON (cs.fk_mode_reglement = pay.id)';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cs.fk_projet";
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
|
||||
@ -223,7 +223,7 @@ if ($search_ref) {
|
||||
if ($search_label) {
|
||||
$sql .= natural_search("cs.libelle", $search_label);
|
||||
}
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
if ($search_project_ref != '') {
|
||||
$sql .= natural_search("p.ref", $search_project_ref);
|
||||
}
|
||||
@ -259,7 +259,7 @@ if ($search_typeid > 0) {
|
||||
$sql .= " AND cs.fk_type = ".((int) $search_typeid);
|
||||
}
|
||||
$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, cs.fk_account, c.libelle, c.accountancy_code, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code, u.lastname";
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$sql .= ", p.rowid, p.ref, p.title";
|
||||
}
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
@ -560,7 +560,7 @@ while ($i < min($num, $limit)) {
|
||||
$chargesociale_static->label = $obj->label;
|
||||
$chargesociale_static->type_label = $obj->type_label;
|
||||
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$projectstatic->id = $obj->project_id;
|
||||
$projectstatic->ref = $obj->project_ref;
|
||||
$projectstatic->title = $obj->project_label;
|
||||
|
||||
@ -25,7 +25,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -93,7 +93,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
|
||||
if (!empty($object->fk_project)) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user