diff --git a/ChangeLog b/ChangeLog
index 76ec4faf452..00fbde60b91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,10 +24,10 @@ For users:
---------------
NEW: Minimal PHP version is now PHP 7.0 instead of PHP 5.6
-NEW: #21780 Add pid field to Cronjob class and store PID on job execution
NEW: #19680 Add option PRODUCT_ALLOW_EXTERNAL_DOWNLOAD to automatically have uploaded files shared publicly by a link
NEW: #20650 can move the checkbox column on left (experimental option MAIN_CHECKBOX_LEFT_COLUMN)
NEW: #21000 Added columns 'alias_name' on project, supplier invoice, supplier order, supplier proposals and task list
+NEW: #21780 Add pid field to Cronjob class and store PID on job execution
NEW: #21395 Added option for dark theme mode in display - color and theme
NEW: #21397 added option to auto define barcode numbers for third-parties in barcode module setup
NEW: #21399
@@ -46,15 +46,11 @@ NEW: #22676 massaction for updating product prices
NEW: #22735 Massaction to affect users on projects
NEW: #25594 can chose if VAT ID is unique or not for third parties
NEW: #4482 adding js to hide/show advanced option on the export data page
+
NEW: Add a constant to disallow modification of the product reference.
-NEW: Add a method doAutoRenewContracts that can be used as a cron task.
-NEW: Add " as enclosure by default for CSV export. Keep removing CR/LF.
NEW: add attached file in presend email form of thirdparty card
NEW: Add a way to enter LICENSE file content in property of website
-NEW: add constant PROPAL_BYPASS_VALIDATED_STATUS
NEW: Add employment anniversary in birthday box
-NEW: Add fail2ban rules examples to limit access to /public pages
-NEW: Add filter "Product subject to lot/Serial" in stock per lot/serial
NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (feature abandonned by mailers)
NEW: Add link to create an element from the category page
NEW: Add max size send for "backup and link to mail" option
@@ -63,43 +59,58 @@ NEW: Add more advices into the Setup security page
NEW: Add new global variable for keeping the previous signature information on proposale (case of reopen a proposale)
NEW: Add objectLink on expedition
NEW: Add oldcopy to Ticket so triggers intercepting TICKET_MODIFY have access to old values of the updated properties
-NEW: Add option FICHINTER_ALLOW_EXTERNAL_DOWNLOAD
NEW: Add option --force on CLI cron_run_jobs.php
NEW: Add option "Show price on the generated documents for receptions"
-NEW: Add performance index (name for company and contact) and llx_bank_url(url_id)
-NEW: Add picto property on sub-module for password generation
+NEW: invoice export : add accounting affectation
+NEW: label on products categories filter
+NEW: manage no email with thirdparties (better for GDPR)
+NEW: Manage VAT on all lines on purchases cycle
+NEW: On a bank reconciled line, we can modify the bank receipt
+NEW: parent company column and filter in invoice and order list
+NEW: possibility to select scopes with checkbox for Oauth tokens
+NEW: private and public note on user, thirdparty and contact list
+NEW: Public counters feature
+NEW: Saved token of OAUTH module are now encrypted into llx_oauth_token
+NEW: Save one click to select on delivery ack, on emails.
+NEW: scheduled job to send unpaid invoice reminder can now use the cc and bcc from email template
+NEW: experimental SMTP using PhpImap allowing OAuth2 authentication (need to add option MAIN_IMAP_USE_PHPIMAP)
+NEW: can substitue project title in mail template
+NEW: The purge of files can purge only if older than a number of seconds
+NEW: Update ActionComm type_code on email message ticket
+NEW: Finance - VAT - Admin - Add information on deadline day for submission of VAT declaration
+NEW: Add the target to select attendees of event for emailings
NEW: add redirect on action confirm addconsumedline and addproduceline
-NEW: Add a new advanced permission "read price"
-NEW: Add substitution key __SENDEREMAIL_SIGNATURE__
NEW: Add the referrer-policy to "same-origin" by default on all public pages.
-NEW: Add the SMTP header References on ticket email created by email
NEW: Add trigger to record the event of sending an email from a project #20912
-NEW: Allow download link option in module configuration (propal,invoice,supplier proposal, order)
-NEW: Can enter the unit price including the vat
+NEW: Allow download link option in module configuration (propal, order, invoice, supplier proposal)
+NEW: Can enter the unit price including the VAT
NEW: Can invoice task time per different services
-NEW: Can join several files by default on email form
NEW: Can set a commercial discount by entering amount including VAT
-NEW: Can set a monthly frequency (or multiple) in cron tasks.
NEW: Can set start and end dates and comment on button "Activate all services"
NEW: can sort and preselected best supplier price
-NEW: Can use products categories to make inventory
-NEW: Change filter type on tickets list into a multiselect combo
NEW: show date delivery planned on orders linked to company and product
-NEW: Encrypt all sensitive constants in llx_const
NEW: filter on reception dates (from / to) in cheque paiement card
+
NEW: Accountancy - Add a graphic option to enable lettering function - FPC21
NEW: Accountancy - Add a way to clean some words when you generate thirdparty accounting account
NEW: Accountancy - Added an option during export to export or not the lettering FPC21
NEW: Accountancy - Manage supplier deposit with specific account
NEW: Accountancy - Model Digitaria - Add a way to clean some words when you generate thirdparty accounting account FPC22
+NEW: Agenda - start a simple support of recurrent events on agenda
NEW: Bank - add salaries & VAT in tab planned entries
-NEW: Contracts - Default template of contract is not mandatory
+NEW: Contracts - add a method doAutoRenewContracts that can be used as a cron task
+NEW: Contracts - default template of contract is not mandatory
NEW: Contracts - Manage Position (Rank) on Contract Lines
NEW: EMail - can copy/paste images into emails sent
NEW: EMail - can edit label of an emailing even once sent
+NEW: EMail - can join several files by default on email form
NEW: EMail - can send an email on scheduled job error
+NEW: EMail - on a form to send an email, we show all emails of all contacts of object
+NEW: EMail - add the SMTP header References on ticket email created by email
+NEW: EMail - add substitution key __SENDEREMAIL_SIGNATURE__
NEW: EMail-Collector - add IMAP port setting
NEW: EMail-Collector - add a button "Test collect"
+NEW: Export - Add " as enclosure by default for CSV export. Keep removing CR/LF.
NEW: Event-Organization - add date event (!= date project) and location on event organization
NEW: Extrafields - add badge in admin extrafields setup
NEW: Extrafields - can edit property css, cssview, csslist on extrafields
@@ -111,8 +122,10 @@ NEW: Invoice - Add french mention on pdf when vat debit option is on
NEW: Members - default_lang for members
NEW: Members - Table of membership types
NEW: Members - add free membership amounts at the membership type level
+NEW: Orders - resize parent company column in order list
+NEW: Products supplier price - autofill default supplier VAT
NEW: Projects - add author on list
-NEW: Projects - add the thirdparty column to the time list (projet/tasks/time.php)
+NEW: Projects - add thirdparty column to the time list (projet/tasks/time.php)
NEW: Proposals - show delivery mode on PDF for proposals
NEW: Proposals - skip accept/refuse process for proposals (option PROPAL_SKIP_ACCEPT_REFUSE)
NEW: Reception - add a from/to on search on date field
@@ -120,64 +133,55 @@ NEW: Stock - page for mass stock transfer can be used with no source stock
NEW: Stock - product categories filter on inventory list
NEW: Stock - show product label on inventory
NEW: Stock - manage virtual stock at a future date
+NEW: Stock Inventory - add filter "Product subject to lot/Serial" in stock per lot/serial
+NEW: Stock Inventory - can use products categories to make inventory
+NEW: Supplier Order List - add column private and public note
NEW: TakePOS - add margin infos to TakePOS invoice lines
-NEW: TakePOS - display currency in TakePOS menu
-NEW: TakePOS - Header Scroll in TakePOS
NEW: TakePOS - add price to product box in TakePOS
NEW: TakePOS - add setup parameters, can setup terminal name
-NEW: TakePOS - support of Stripe Terminal with TakePOS
-NEW: TakePOS - Receipt preview in TakePOS setup
NEW: TakePOS - different product list on smartphone
+NEW: TakePOS - display currency in TakePOS menu
+NEW: TakePOS - Header Scroll in TakePOS
+NEW: TakePOS - Receipt preview in TakePOS setup
+NEW: TakePOS - support of Stripe Terminal with TakePOS
NEW: Thirdparty - set thirdparty type with company modify trigger
+NEW: Tickets - change filter type on tickets list into a multiselect combo
NEW: Website - can delete a whole website if disabled
NEW: Website - can remove a website template
NEW: Website - can set header "Strict-Transport-Security" in web sites.
NEW: Website - can switch status of website and page from the website toolbar
NEW: Website - Templates of websites are now directories and not zip into core repo
NEW: Website - add 4 other templates in website module
-NEW: General - Bulk action to remove a category in list/search website pages
-NEW: General - If we select another view list mode, we keep it
-NEW: General - Introduce dolEncrypt and dolDecrypt to be able to encrypt data in db
-NEW: invoice export : add accounting affectation
-NEW: label on products categories filter
-NEW: The link "add to bookmark" is always on top in the bookmark popup
-NEW: manage no email with thirdparties (better for GDPR)
-NEW: Manage VAT on all lines on purchases cycle
-NEW: On a bank reconciled line, we can modify the bank receipt
-NEW: On a form to send an email, we show all emails of all contacts of object
-NEW: parent company column and filter in invoice and order list
-NEW: Add show "Sales rep" option for PDF
-NEW: Picto for shared link is clickable
-NEW: possibility to select scopes with checkbox for Oauth tokens
-NEW: private and public note on user, thirdparty and contact list
-NEW: Product supplier price: autofill default supplier VAT
-NEW: Public counters feature
-NEW: Start a simple support of recurrent events on agenda
-NEW: Resize parent company column in order list
-NEW: Saved token of OAUTH module are now encrypted into llx_oauth_token
-NEW: Save one click to select on delivery ack, on emails.
-NEW: scheduled job to send unpaid invoice reminder can now use the cc and bcc from email template
-NEW: Show also scheduled task never finished in scheduled task widget
-NEW: show badge with number of extrafields in setup
-NEW: show category tree in sellist and chkbxlst for common object
-NEW: Show picto and color into combo for selection of tags
-NEW: show sell-by and eat-by dates only if not empty
-NEW: show SellBy/EatBy dates for each batch product in shipment card
-NEW: experimental SMTP using PhpImap allowing OAuth2 authentication (need to add option MAIN_IMAP_USE_PHPIMAP)
-NEW: can substitue project title in mail template
-NEW: Supplier order list - Add column private and public note
-NEW: The purge of files can purge only if older than a number of seconds
-NEW: Update ActionComm type_code on email message ticket
-NEW: VAT - Admin - Add information on deadline day for submission of VAT declaration
-NEW: expand/collapse permissions on user permission page
-NEW: Add the target to select attendees of event for emailings
+
+General:
+NEW: Actions: Bulk action to remove a category in list/search website pages
+NEW: Cronjobs: can set a monthly frequency (or multiple) in cron tasks
+NEW: Database: Encrypt all sensitive constants in llx_const
+NEW: Database: Add performance index (name for company and contact) and llx_bank_url(url_id)
+NEW: Database: Introduce dolEncrypt and dolDecrypt to be able to encrypt data in db
+NEW: GUI: If we select another view list mode, we keep it
+NEW: GUI: the link "add to bookmark" is always on top in the bookmark popup
+NEW: GUI: Picto for shared link is clickable
+NEW: GUI: add picto property on sub-module for password generation
+NEW: GUI: show also scheduled task never finished in scheduled task widget
+NEW: GUI: show badge with number of extrafields in setup
+NEW: GUI: show category tree in sellist and chkbxlst for common object
+NEW: GUI: show picto and color into combo for selection of tags
+NEW: GUI: show sell-by and eat-by dates only if not empty
+NEW: GUI: show SellBy/EatBy dates for each batch product in shipment card
+NEW: GUI/Permissions: expand/collapse permissions on user permission page
+NEW: Permissions: add a new advanced permission "read price"
+NEW: Print: add show "Sales rep" option for PDF
+NEW: Security: add fail2ban rules examples to limit access to /public pages
Option / Const for System:
-NEW: MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS const to show category customer filter
-NEW: PRODUCTBATCH_SHOW_WAREHOUSE_ON_SHIPMENT showing warehouse on PDF
-NEW: PRODUIT_DESC_IN_FORM accept (desktop only or +smartphone)
+NEW: FICHINTER_ALLOW_EXTERNAL_DOWNLOAD
+NEW: MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS - const to show category customer filter
+NEW: PRODUCTBATCH_SHOW_WAREHOUSE_ON_SHIPMENT - showing warehouse on PDF
+NEW: PRODUIT_DESC_IN_FORM accept - desktop only or +smartphone
+NEW: PROPAL_BYPASS_VALIDATED_STATUS
NEW: PROPAL_NEW_AS_SIGNED
-NEW: TIMESPENT_ALWAYS_UPDATE_THM, when it's on we always check current thm of user to update it in task time line
+NEW: TIMESPENT_ALWAYS_UPDATE_THM - when it's on we always check current thm of user to update it in task time line
Localisation:
NEW: adding JAPAN Chart-of-Account and regions/departments
@@ -207,7 +211,7 @@ NEW: support multilang in Civilities API
Hooks:
NEW: Actioncomm - add new hooks for actioncomm
-NEW: Actioncomm - hook formConfirm on action comm card
+NEW: Actioncomm - hook formConfirm on actioncomm card
NEW: Agenda - hook on agenda pages
NEW: Help - hook "changeHelpURL" to modify target of the help button
NEW: Product - add hook to show virtual stock details on product stock card
diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php
index 217dfd63cc9..8c082d674db 100644
--- a/htdocs/admin/oauth.php
+++ b/htdocs/admin/oauth.php
@@ -48,6 +48,8 @@ $action = GETPOST('action', 'aZ09');
$provider = GETPOST('provider', 'aZ09');
$label = GETPOST('label', 'aZ09');
+$servicetoeditname = GETPOST('servicetoeditname', 'aZ09');
+
$error = 0;
@@ -72,15 +74,24 @@ if ($action == 'update') {
foreach ($conf->global as $key => $val) {
if (!empty($val) && preg_match('/^OAUTH_.+_ID$/', $key)) {
$constvalue = str_replace('_ID', '', $key);
- if (!dolibarr_set_const($db, $constvalue.'_ID', GETPOST($constvalue.'_ID'), 'chaine', 0, '', $conf->entity)) {
- $error++;
+ $newconstvalue = $constvalue;
+ if (GETPOSTISSET($constvalue.'_NAME')) {
+ $newconstvalue = preg_replace('/-.*$/', '', $constvalue).'-'.GETPOST($constvalue.'_NAME');
+ }
+
+ if (GETPOSTISSET($constvalue.'_ID')) {
+ if (!dolibarr_set_const($db, $newconstvalue.'_ID', GETPOST($constvalue.'_ID'), 'chaine', 0, '', $conf->entity)) {
+ $error++;
+ }
}
// If we reset this provider, we also remove the secret
- if (!dolibarr_set_const($db, $constvalue.'_SECRET', GETPOST($constvalue.'_ID') ? GETPOST($constvalue.'_SECRET') : '', 'chaine', 0, '', $conf->entity)) {
- $error++;
+ if (GETPOSTISSET($constvalue.'_SECRET')) {
+ if (!dolibarr_set_const($db, $newconstvalue.'_SECRET', GETPOST($constvalue.'_ID') ? GETPOST($constvalue.'_SECRET') : '', 'chaine', 0, '', $conf->entity)) {
+ $error++;
+ }
}
if (GETPOSTISSET($constvalue.'_URLAUTHORIZE')) {
- if (!dolibarr_set_const($db, $constvalue.'_URLAUTHORIZE', GETPOST($constvalue.'_URLAUTHORIZE'), 'chaine', 0, '', $conf->entity)) {
+ if (!dolibarr_set_const($db, $newconstvalue.'_URLAUTHORIZE', GETPOST($constvalue.'_URLAUTHORIZE'), 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
@@ -90,14 +101,46 @@ if ($action == 'update') {
} else {
$scopestring = GETPOST($constvalue.'_SCOPE');
}
- if (!dolibarr_set_const($db, $constvalue.'_SCOPE', $scopestring, 'chaine', 0, '', $conf->entity)) {
+ if (!dolibarr_set_const($db, $newconstvalue.'_SCOPE', $scopestring, 'chaine', 0, '', $conf->entity)) {
$error++;
}
- } else {
- if (!dolibarr_set_const($db, $constvalue.'_SCOPE', '', 'chaine', 0, '', $conf->entity)) {
+ } elseif ($newconstvalue !== $constvalue) {
+ if (!dolibarr_set_const($db, $newconstvalue.'_SCOPE', '', 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
+
+ // If name changed, we have to delete old const and proceed few other changes
+ if ($constvalue !== $newconstvalue) {
+ dolibarr_del_const($db, $constvalue.'_ID', $conf->entity);
+ dolibarr_del_const($db, $constvalue.'_SECRET', $conf->entity);
+ dolibarr_del_const($db, $constvalue.'_URLAUTHORIZE', $conf->entity);
+ dolibarr_del_const($db, $constvalue.'_SCOPE', $conf->entity);
+
+ // Update name of token
+ $oldname = preg_replace('/^OAUTH_/', '', $constvalue);
+ $oldprovider = ucfirst(strtolower(preg_replace('/-.*$/', '', $oldname)));
+ $oldlabel = preg_replace('/^.*-/', '', $oldname);
+ $newlabel = preg_replace('/^.*-/', '', $newconstvalue);
+
+
+ $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
+ $sql.= " SET service = '".$db->escape($oldprovider."-".$newlabel)."'";
+ $sql.= " WHERE service = '".$db->escape($oldprovider."-".$oldlabel)."'";
+
+
+ $resql = $db->query($sql);
+ if (!$resql) {
+ $error++;
+ }
+
+ // Update const where the token was used, might not be exhaustive
+ if (getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE') == $oldname) {
+ if (!dolibarr_set_const($db, 'MAIN_MAIL_SMTPS_OAUTH_SERVICE', strtoupper($oldprovider).'-'.$newlabel, 'chaine', 0, '', $conf->entity)) {
+ $error++;
+ }
+ }
+ }
}
}
@@ -270,11 +313,16 @@ if (count($listinsetup) > 0) {
} else {
print $label;
}
- if ($keyforprovider) {
+ if ($servicetoeditname == $key[0]) {
+ print ' ()';
+ } elseif ($keyforprovider) {
print ' ('.$keyforprovider.')';
} else {
print ' ('.$langs->trans("NoName").')';
}
+ if (!($servicetoeditname == $key[0])) {
+ print ''.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'';
+ }
print '';
print '
';
if (!empty($supportedoauth2array[$keyforsupportedoauth2array]['urlforcredentials'])) {
diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php
index e06cdeb0312..c79a3e63653 100644
--- a/htdocs/api/class/api_setup.class.php
+++ b/htdocs/api/class/api_setup.class.php
@@ -1682,6 +1682,68 @@ class Setup extends DolibarrApi
return $list;
}
+ /**
+ * Get the list of incoterms.
+ *
+ * @param string $sortfield Sort field
+ * @param string $sortorder Sort order
+ * @param int $limit Number of items per page
+ * @param int $page Page number (starting from zero)
+ * @param int $active Payment term is active or not {@min 0} {@max 1}
+ * @param string $lang Code of the language the label of the type must be translated to
+ * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
+ * @return array List of incoterm types
+ *
+ * @url GET dictionary/incoterms
+ *
+ * @throws RestException
+ */
+ public function getListOfIncoterms($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $lang = '', $sqlfilters = '')
+ {
+ $list = array();
+
+ $sql = "SELECT rowid, code, active";
+ $sql .= " FROM ".MAIN_DB_PREFIX."c_incoterms as t";
+ $sql .= " WHERE 1=1";
+
+ // Add sql filters
+ if ($sqlfilters) {
+ $errormessage = '';
+ if (!DolibarrApi::_checkFilters($sqlfilters, $errormessage)) {
+ throw new RestException(400, 'Error when validating parameter sqlfilters -> '.$errormessage);
+ }
+ $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^\(\)]+)\)';
+ $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
+ }
+
+
+ $sql .= $this->db->order($sortfield, $sortorder);
+
+ if ($limit) {
+ if ($page < 0) {
+ $page = 0;
+ }
+ $offset = $limit * $page;
+
+ $sql .= $this->db->plimit($limit, $offset);
+ }
+
+ $result = $this->db->query($sql);
+
+ if ($result) {
+ $num = $this->db->num_rows($result);
+ $min = min($num, ($limit <= 0 ? $num : $limit));
+ for ($i = 0; $i < $min; $i++) {
+ $type =$this->db->fetch_object($result);
+ $list[] = $type;
+ }
+ } else {
+ throw new RestException(503, 'Error when retrieving list of incoterm types : '.$this->db->lasterror());
+ }
+
+ return $list;
+ }
+
/**
* Get properties of company
*
diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php
index 373effecbe8..56361b948f0 100644
--- a/htdocs/barcode/printsheet.php
+++ b/htdocs/barcode/printsheet.php
@@ -226,7 +226,7 @@ if ($action == 'builddoc') {
'code'=>$code,
'encoding'=>$encoding,
'is2d'=>$is2d,
- 'photo'=>$barcodeimage // Photo must be a file that exists with format supported by TCPDF
+ 'photo'=>!empty($barcodeimage) ? $barcodeimage : '' // Photo must be a file that exists with format supported by TCPDF
);
}
} else {
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 333b6232f9f..fbced8e6773 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -358,11 +358,11 @@ if (empty($reshook)) {
// Confirmation to delete
if ($action == 'delete') {
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1);
}
// Confirmation to delete line
if ($action == 'deleteline') {
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
}
// Confirmation of validation
@@ -393,13 +393,13 @@ if (empty($reshook)) {
$forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
}
$formquestion = array(
- // 'text' => $langs->trans("ConfirmClone"),
- // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
- // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
);
}
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
}
// Confirmation of closing
@@ -421,13 +421,13 @@ if (empty($reshook)) {
$forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
}
$formquestion = array(
- // 'text' => $langs->trans("ConfirmClone"),
- // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
- // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
);
}
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Close'), $text, 'confirm_close', $formquestion, 0, 1, 220);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Close'), $text, 'confirm_close', $formquestion, 0, 1, 220);
}
// Confirmation of reopen
@@ -444,26 +444,26 @@ if (empty($reshook)) {
$formquestion = array();
if (isModEnabled('bom')) {
$langs->load("mrp");
- require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+ require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
$forcecombo = 0;
if ($conf->browser->name == 'ie') {
$forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
}
$formquestion = array(
- // 'text' => $langs->trans("ConfirmClone"),
- // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
- // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
);
}
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $text, 'confirm_reopen', $formquestion, 0, 1, 220);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $text, 'confirm_reopen', $formquestion, 0, 1, 220);
}
// Clone confirmation
if ($action == 'clone') {
// Create an array for form
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation of action xxxx
@@ -471,7 +471,7 @@ if (empty($reshook)) {
$text = $langs->trans('ConfirmSetToDraft', $object->ref);
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220);
}
// Call Hook formConfirm
@@ -489,7 +489,7 @@ if (empty($reshook)) {
// Object card
// ------------------------------------------------------------
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = '' . $langs->trans("BackToList") . '';
$morehtmlref = '
';
// Other attributes
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '
';
print '';
@@ -559,7 +559,6 @@ if (empty($reshook)) {
print dol_get_fiche_end();
-
/*
* Lines
*/
@@ -580,7 +579,7 @@ if (empty($reshook)) {
';
if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
- include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '
';
@@ -602,7 +601,7 @@ if (empty($reshook)) {
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
- $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
+ $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
}
}
@@ -652,7 +651,7 @@ if (empty($reshook)) {
$reshook = $hookmanager->executeHooks('formAddObjectServiceLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
- $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
+ $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
}
}
}
@@ -665,146 +664,146 @@ if (empty($reshook)) {
print "\n";
mrpCollapseBomManagement();
- }
- $res = $object->fetchLines();
+ $res = $object->fetchLines();
- // Buttons for actions
+ // Buttons for actions
- if ($action != 'presend' && $action != 'editline') {
- print '
'."\n";
- $parameters = array();
- $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- if ($reshook < 0) {
- setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- }
-
- if (empty($reshook)) {
- // Send
- //if (empty($user->socid)) {
- // print 'id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . ''."\n";
- //}
-
- // Back to draft
- if ($object->status == $object::STATUS_VALIDATED) {
- if ($permissiontoadd) {
- print ''.$langs->trans("SetToDraft").''."\n";
- }
+ if ($action != 'presend' && $action != 'editline') {
+ print '
';
// Status of recipient sending email (Warning != status of emailing)
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index d3ebc379b55..cf3d18adbac 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -101,7 +101,7 @@ if (is_resource($handle)) {
$qualified = 1;
foreach ($mailmodule->require_module as $key) {
- if (!$conf->$key->enabled || (!$user->admin && $mailmodule->require_admin)) {
+ if (empty($conf->$key->enabled) || (!$user->admin && $mailmodule->require_admin)) {
$qualified = 0;
//print "Les pr�requis d'activation du module mailing ne sont pas respect�s. Il ne sera pas actif";
break;
@@ -176,7 +176,7 @@ if ($result) {
print '
';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
+ // Action column
+ if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ print '
';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->rowid, $arrayofselected)) {
+ $selected = 1;
+ }
+ print '';
+ }
+ print '
';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Action column
+ if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ print '
';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->rowid, $arrayofselected)) {
+ $selected = 1;
}
+ print '';
+ }
+ print '
';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
- }
- print '';
- }
- print '