diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml
index eeb943534d7..1bd342f9737 100644
--- a/.github/workflows/phpcsfixer.yml
+++ b/.github/workflows/phpcsfixer.yml
@@ -20,8 +20,10 @@ jobs:
#needs: filesChanged
steps:
- uses: actions/checkout@v3
- #with:
- # fetch-depth: 10
+ with:
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
+ ref: ${{ github.event.pull_request.head.ref }}
+ # fetch-depth: 10
- name: echo Get list of all changed files
run: |
@@ -41,6 +43,20 @@ jobs:
phpcs_ref_name: ${{github.ref_name}}
phpcs_github_event_name: ${{github.event_name}}
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
- - uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
+
+ #- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
+ # with:
+ # commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
+
+ - name: Commit changes
+ uses: EndBug/add-and-commit@v9.1.3
with:
- commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
+ default_author: github_actions
+ committer_name: GitHub Actions
+ committer_email: actions@github.com
+ #author_name: PHP CS fixer
+ #author_email: eldy@destailleur.fr
+ #committer_name: PHP CS fixer
+ #committer_email: eldy@destailleur.fr
+ message: 'PHP CS fixer github action'
+ add: '*.php'
diff --git a/ChangeLog b/ChangeLog
index 29418815dd1..da15649487f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,7 +60,6 @@ NEW: Can set the page "List of opportunities" as landing page
NEW: Can show the sql request used on emailing selection
NEW: can stay on edit field when errors occurs
NEW: comment in api_mymodule for seperate methods
-NEW: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: create email substitution variable for intervention signature URL
NEW: Debug the custom CSS feature to avoid a directory search/scan at
NEW: dev name
@@ -75,6 +74,7 @@ NEW: Email-Collector: operation type in email collector to load or create contac
NEW: Email-Collector: easier setup - can also use ! for negative search
NEW: Events: can add any contact on events if global MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT is set at 1
NEW: Events: list with color
+NEW: Events: remove default percentage for event creation url
NEW: expend/collapse list of social networks
NEW: Filter on amount and qty on list of service's contracts
NEW: formconfirm can support field with format datetime
@@ -98,7 +98,6 @@ NEW: Import: map table to element for get entity in import
NEW: inc.php: handle parameters from argv
NEW: Invoice - show category of operations
NEW: Keep a link between user created from recruitment and application
-NEW: List product in orders
NEW: Mass Actions: Better responsive for mass actions
NEW: Members: add numbering modules for members
NEW: Members: add widget box_members_by_tags.php
@@ -116,28 +115,31 @@ NEW: only get openned contact from liste_contact function, to not have acces to
NEW: Option to manage deposit slips for more payment modes (not only
NEW: Option to show column for field and line selection on the left
NEW: Orders: add sub total in order list det
+NEW: Orders: list product in orders
NEW: Orders export: allow to export field 'shipment method'
NEW: payment default values when supplier order created from reception
-NEW: Payment : manage contracts
+NEW: Payment: manage contracts
+NEW: Payment: sepaStripe now creates the payment mode with type pm_ using new API
NEW: presend mass action in contact list
NEW: Print PDF: category of operation for crabe PDF model
NEW: Print PDF: Name and date to print on PDF Sign
NEW: Print PDF: Use the more recent PDF templates for documents by default on a fresh install
+NEW: Print PDF: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
+NEW: Print PDF: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: product images on popup are cached
NEW: Products: Add statistics by amount on statistics of products.
NEW: Proposals: filter for Signed+Billed in proposals
NEW: Proposals: can modify margin rates in offers like VAT rates
NEW: Proposals: option filter for NoSalesRepresentativeAffected in proposals list
+NEW: Proposals: constant PROPALE_ADDON_NOTE_PUBLIC_DEFAULT
NEW: Provide the oldcopy value when calling setValueFrom() function with a trigger key
NEW: Reception: can receive more than qty ordered on reception
NEW: referential objects of batch
-NEW: remove default percentage for event creation url
NEW: remove keys whose table element is the same as element in map list
NEW: repair script skip views
NEW: Security: Save date to invalidate other session into user table
NEW: Security: Invalidate all sessions of a user when password is modified.
NEW: search on time spent duration range
-NEW: sepaStripe now creates the payment mode with type pm_ using new API
NEW: set payment default values when supplier order created from reception
NEW: set today start time at beginning
NEW: Show counter of access of website in website list
@@ -159,9 +161,8 @@ NEW: tables: llx_element_time to store time spent on several elements (mo, ticke
NEW: TakePOS: adapt category and product pictures sizes on TakePOS
NEW: TakePOS: limit load products in TakePOS
NEW: The batch for remind on due date can be setup for using validation date
-NEW: The refresh link for imap collector is always visible
+NEW: The refresh link for IMAP collector is always visible
NEW: The upgrade process can be done by creating a file upgrade.unlock
-NEW: Tickets: --Send an email when ticket assigned--
NEW: Tickets: Send a notification email when ticket assigned
NEW: Tickets: set ticket status to answered if the client has answered from the public interface
NEW: Tickets: added an option to display the progress of tickets on the public interface
@@ -169,13 +170,10 @@ NEW: Tickets: add link to thirdparty tickets history
NEW: Tickets: notify also the contributor affected to a ticket if a new message public is post (add global TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR)
NEW: Use a cache file for external RSS in calendar
NEW: Use by default the domain $dolibarr_main_url_root for SMTP HELO
-NEW: use more recent model by default
NEW: VAT can be modified during add of line
NEW: Website Module: Increment website counter on each page access in website module
NEW: write all fields and their properties in asciidoc format
NEW: Can add an array of several links in date selector
-NEW: Option PDF_SHOW_PHONE_AFTER_USER_CONTACT to show phone after specific assigned contact on PDF
-NEW: Option PDF_SHOW_EMAIL_AFTER_USER_CONTACT to show email after specific assigned contact on PDF
NEW: Widgets: Implement MAIN_ACTIVATE_FILECACHE on birthday widget
NEW: Widgets: Add widget "The next upcoming events"
NEW: Widgets: Add widget of open opportunities
@@ -192,10 +190,11 @@ NEW: add triggers on mailing
NEW: Add a trigger when create a shipping line batch and fix propagate missing errors
NEW: add function for listiong objects from directory
NEW: add helplist property to describe fields of objects
-NEW: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign
+NEW: Hooks: printFieldListFrom in contact list
+NEW: Hooks: add hook in loadLotStock() in html.formproduct.class.php file, add hook 'llxFooter', Add hook online sign
NEW: Update lib parsedownto 1.7.4, phpspreadsheet lib to v1.12, ESCPOS v3.0, jquery, Stripe.
-NEW: Support contact in post() document API
-NEW: More APIs (update currency rate, upload of supplier documents, ...)
+NEW: API: Support contact in post() document API
+NEW: API: more APIs (update currency rate, upload of supplier documents, ...)
NEW: ModuleBuilder: updating in modulbuilder on tab Menu when adding object
NEW: ModuleBuilder: add/edit permissions
NEW: ModuleBuilder: better generated documentation
diff --git a/dev/examples/zapier/package.json b/dev/examples/zapier/package.json
index 8852928771f..ef70b2af8fd 100644
--- a/dev/examples/zapier/package.json
+++ b/dev/examples/zapier/package.json
@@ -15,7 +15,7 @@
"npm": ">=5.6.0"
},
"dependencies": {
- "zapier-platform-core": "11.3.1"
+ "zapier-platform-core": "15.0.1"
},
"devDependencies": {
"mocha": "^5.2.0",
diff --git a/htdocs/admin/bomline_extrafields.php b/htdocs/admin/bomline_extrafields.php
index 1a21f052b84..69a89e208fe 100644
--- a/htdocs/admin/bomline_extrafields.php
+++ b/htdocs/admin/bomline_extrafields.php
@@ -65,11 +65,11 @@ require DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php';
*/
$help_url = '';
-llxHeader('', $langs->trans("BOMLinesSetup"), $help_url);
+llxHeader('', $langs->trans("BOMsSetup"), $help_url);
$linkback = '' . $langs->trans("BackToModuleList") . '';
-print load_fiche_titre($langs->trans("BOMLinesSetup"), $linkback, 'title_setup');
+print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup');
$head = bomAdminPrepareHead();
diff --git a/htdocs/bookcal/class/booking.class.php b/htdocs/bookcal/class/booking.class.php
index fab4cd6ba95..897936f995b 100644
--- a/htdocs/bookcal/class/booking.class.php
+++ b/htdocs/bookcal/class/booking.class.php
@@ -122,6 +122,7 @@ class Booking extends CommonObject
'email' => array('type'=>'varchar(128)', 'label'=>'email', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>-1,),
'start' => array('type'=>'datetime', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>-1,),
'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>-1,),
+ 'fk_bookcal_availability' => array('type'=>'integer:Availabilities:bookcal/class/availabilities.class.php', 'label'=>'AvailabilityId', 'enabled'=>'1', 'position'=>49, 'notnull'=>1, 'visible'=>-1,),
);
public $rowid;
public $ref;
@@ -143,6 +144,7 @@ class Booking extends CommonObject
public $email;
public $start;
public $duration;
+ public $fk_bookcal_availability;
// END MODULEBUILDER PROPERTIES
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index d2d3812400d..3e4ae193a94 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -41,6 +41,7 @@ $optioncss = GETPOST('optioncss', 'alpha');
$mode = GETPOST('mode', 'aZ');
$id = GETPOST("id", 'int');
+$search_title = GETPOST('search_title', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
@@ -165,6 +166,9 @@ $sqlfields = $sql; // $sql fields to remove for count total
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid";
$sql .= " WHERE 1=1";
+if ($search_title) {
+ $sql .= natural_search('title', $search_title);
+}
$sql .= " AND b.entity IN (".getEntity('bookmark').")";
if (!$user->admin) {
$sql .= " AND (b.fk_user = ".((int) $user->id)." OR b.fk_user is NULL OR b.fk_user = 0)";
@@ -313,21 +317,25 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$totalarray['nbfield']++;
}
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, '', $sortfield, $sortorder);
+$totalarray['nbfield']++;
print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, '', $sortfield, $sortorder);
+$totalarray['nbfield']++;
print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, '', $sortfield, $sortorder);
+$totalarray['nbfield']++;
print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "b.target", "", $param, '', $sortfield, $sortorder, 'center ');
+$totalarray['nbfield']++;
print_liste_field_titre("Visibility", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder, 'center ');
+$totalarray['nbfield']++;
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "b.dateb", "", $param, '', $sortfield, $sortorder, 'center ');
+$totalarray['nbfield']++;
print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, '', $sortfield, $sortorder, 'right ');
+$totalarray['nbfield']++;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
$totalarray['nbfield']++;
}
print ''."\n";
-$totalarray = array();
-$totalarray['nbfield'] = 0;
-
// Loop on record
// --------------------------------------------------------------------
$i = 0;
@@ -475,7 +483,7 @@ if ($num == 0) {
$colspan++;
}
}
- print '
';
if ($histo[$key]['userid'] > 0) {
if (!isset($userGetNomUrlCache[$histo[$key]['userid']])) { // is in cache ?
$userstatic->fetch($histo[$key]['userid']);
diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php
index 2d17038f43e..7d1f6b741de 100644
--- a/htdocs/core/modules/modStock.class.php
+++ b/htdocs/core/modules/modStock.class.php
@@ -237,6 +237,9 @@ class modStock extends DolibarrModules
'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice',
'p.seuil_stock_alerte'=>'StockLimit',
);
+ if (isModEnabled('barcode')) {
+ $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode'));
+ }
$this->export_TypeFields_array[$r] = array(
'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text',
'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text",
@@ -245,6 +248,9 @@ class modStock extends DolibarrModules
'ps.reel'=>'Numeric',
'p.seuil_stock_alerte'=>'Numeric',
);
+ if (isModEnabled('barcode')) {
+ $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text'));
+ }
$this->export_entities_array[$r] = array(
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product",
@@ -252,6 +258,9 @@ class modStock extends DolibarrModules
'ps.reel'=>'stock',
'p.seuil_stock_alerte'=>'product',
); // We define here only fields that use another icon that the one defined into export_icon
+ if (isModEnabled('barcode')) {
+ $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product'));
+ }
$this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet
$this->export_dependencies_array[$r] = array('stock'=>array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them.
$keyforselect = 'product';
@@ -284,6 +293,9 @@ class modStock extends DolibarrModules
'pb.rowid'=>'Id', 'pb.batch'=>'Batch', 'pb.qty'=>'Qty',
'pl.eatby'=>'EatByDate', 'pl.sellby'=>'SellByDate'
);
+ if (isModEnabled('barcode')) {
+ $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode'));
+ }
$this->export_TypeFields_array[$r] = array(
'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.description'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text',
'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text",
@@ -292,6 +304,9 @@ class modStock extends DolibarrModules
'pb.batch'=>'Text', 'pb.qty'=>'Numeric',
'pl.eatby'=>'Date', 'pl.sellby'=>'Date'
);
+ if (isModEnabled('barcode')) {
+ $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text'));
+ }
$this->export_entities_array[$r] = array(
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product",
@@ -299,6 +314,9 @@ class modStock extends DolibarrModules
'pb.rowid'=>'batch', 'pb.batch'=>'batch', 'pb.qty'=>'batch',
'pl.eatby'=>'batch', 'pl.sellby'=>'batch'
); // We define here only fields that use another icon that the one defined into export_icon
+ if (isModEnabled('barcode')) {
+ $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product'));
+ }
$this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet
$this->export_dependencies_array[$r] = array('stockbatch'=>array('pb.rowid'), 'batch'=>array('pb.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
$keyforselect = 'product_lot';
@@ -329,12 +347,18 @@ class modStock extends DolibarrModules
'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note",
'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification'
);
+ if (isModEnabled('barcode')) {
+ $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode'));
+ }
$this->export_TypeFields_array[$r] = array(
'sm.rowid'=>'Numeric', 'sm.value'=>'Numeric', 'sm.datem'=>'Date', 'sm.batch'=>'Text', 'sm.label'=>'Text', 'sm.inventorycode'=>'Text',
'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.description'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text',
'p.rowid'=>"Numeric", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text",
'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date'
);
+ if (isModEnabled('barcode')) {
+ $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text'));
+ }
$this->export_entities_array[$r] = array(
'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', 'e.town'=>'warehouse',
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
@@ -345,6 +369,9 @@ class modStock extends DolibarrModules
$this->export_TypeFields_array[$r]['sm.batch'] = 'Text';
$this->export_entities_array[$r]['sm.batch'] = 'movement';
}
+ if (isModEnabled('barcode')) {
+ $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product'));
+ }
$this->export_aggregate_array[$r] = array('sm.value'=>'SUM'); // TODO Not used yet
$this->export_dependencies_array[$r] = array('movement'=>array('sm.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index e4d46662197..b118a0b021e 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -1089,6 +1089,7 @@ class pdf_vinci extends ModelePDFMo
$posx = $this->page_largeur - $this->marge_droite - 100;
$posy = $this->marge_haute;
+ $w = 100;
$pdf->SetXY($this->marge_gauche, $posy);
diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php
index a043cf23e57..39217fdf825 100644
--- a/htdocs/core/modules/oauth/google_oauthcallback.php
+++ b/htdocs/core/modules/oauth/google_oauthcallback.php
@@ -263,6 +263,7 @@ if (!GETPOST('code')) {
dol_syslog("userinfo=".var_export($userinfo, true));
$useremail = $userinfo['email'];
+
/*
$useremailverified = $userinfo['email_verified'];
$useremailuniq = $userinfo['sub'];
@@ -280,6 +281,12 @@ if (!GETPOST('code')) {
// Verify that the ID token is properly signed by the issuer. Google-issued tokens are signed using one of the certificates found at the URI specified in the jwks_uri metadata value of the Discovery document.
// TODO
+ // Verify that email is a verified email
+ /*if (empty($userinfo['email_verified'])) {
+ setEventMessages($langs->trans('Bad value for email, emai lwas not verified by Google'), null, 'errors');
+ $errorincheck++;
+ }*/
+
// Verify that the value of the iss claim in the ID token is equal to https://accounts.google.com or accounts.google.com.
if ($userinfo['iss'] != 'accounts.google.com' && $userinfo['iss'] != 'https://accounts.google.com') {
setEventMessages($langs->trans('Bad value for returned userinfo[iss]'), null, 'errors');
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index cf94376b285..230a46ed90a 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -161,6 +161,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Define position of columns
$this->posxdesc = $this->marge_gauche + 1; // For module retrocompatibility support durring PDF transition: TODO remove this at the end
+ $this->tabTitleHeight = 5; // default height
+
$this->tva = array();
$this->tva_array = array();
$this->localtax1 = array();
@@ -511,11 +513,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$height_note = 0;
}
- $nexY = $tab_top + 5;
-
// Use new auto collum system
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
+ $nexY = $tab_top + $this->tabTitleHeight;
+
// Loop on each lines
$pageposbeforeprintlines = $pdf->getPage();
$pagenb = $pageposbeforeprintlines;
@@ -1185,29 +1187,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
- foreach ($this->cols as $colKey => $colDef) {
- if (!$this->getColumnStatus($colKey)) {
- continue;
- }
-
- // get title label
- $colDef['title']['label'] = !empty($colDef['title']['label']) ? $colDef['title']['label'] : $outputlangs->transnoentities($colDef['title']['textkey']);
-
- // Add column separator
- if (!empty($colDef['border-left'])) {
- $pdf->line($colDef['xStartPos'], $tab_top, $colDef['xStartPos'], $tab_top + $tab_height);
- }
-
- if (empty($hidetop)) {
- $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
-
- $textWidth = $colDef['width'] - $colDef['title']['padding'][3] - $colDef['title']['padding'][1];
- $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
- }
- }
+ $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
if (empty($hidetop)) {
- $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
+ $pdf->line($this->marge_gauche, $tab_top + $this->tabTitleHeight, $this->page_largeur - $this->marge_droite, $tab_top + $this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter
}
}
@@ -1547,7 +1530,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
'align' => 'L',
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
// 'label' => ' ', // the final label
- 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
+ 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
),
'content' => array(
'align' => 'L',
diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php
index 94eb8ff0a86..fcc7b12b1d2 100644
--- a/htdocs/core/tpl/extrafields_view.tpl.php
+++ b/htdocs/core/tpl/extrafields_view.tpl.php
@@ -156,43 +156,46 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l
if ($object->element == 'fichinter') {
$keyforperm = 'ficheinter';
}
+ if ($object->element == 'product') {
+ $keyforperm = 'produit';
+ }
if (isset($user->rights->$keyforperm)) {
- $permok = !empty($user->rights->$keyforperm->creer) || !empty($user->rights->$keyforperm->create) || !empty($user->rights->$keyforperm->write);
+ $permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRight($keyforperm, 'write');
}
if ($object->element == 'order_supplier') {
if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) {
- $permok = $user->rights->fournisseur->commande->creer;
+ $permok = $user->hasRight('fournisseur', 'commande', 'creer');
} else {
- $permok = $user->rights->supplier_order->creer;
+ $permok = $user->hasRight('supplier_order', 'creer');
}
}
if ($object->element == 'invoice_supplier') {
if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) {
- $permok = $user->rights->fournisseur->facture->creer;
+ $permok = $user->hasRight('fournisseur', 'facture', 'creer');
} else {
- $permok = $user->rights->supplier_invoice->creer;
+ $permok = $user->hasRight('supplier_invoice', 'creer');
}
}
if ($object->element == 'shipping') {
- $permok = $user->rights->expedition->creer;
+ $permok = $user->hasRight('expedition', 'creer');
}
if ($object->element == 'delivery') {
- $permok = $user->rights->expedition->delivery->creer;
+ $permok = $user->hasRight('expedition', 'delivery', 'creer');
}
if ($object->element == 'productlot') {
- $permok = $user->rights->stock->creer;
+ $permok = $user->hasRight('stock', 'creer');
}
if ($object->element == 'facturerec') {
$permok = $user->hasRight('facture', 'creer');
}
if ($object->element == 'mo') {
- $permok = $user->rights->mrp->write;
+ $permok = $user->hasRight('mrp', 'write');
}
if ($object->element == 'contact') {
$permok = $user->hasRight('societe', 'contact', 'creer');
}
if ($object->element == 'salary') {
- $permok = $user->rights->salaries->read;
+ $permok = $user->hasRight('salaries', 'read');
}
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore
index 9420e8c61eb..224a544fee7 100644
--- a/htdocs/custom/.gitignore
+++ b/htdocs/custom/.gitignore
@@ -2,3 +2,6 @@
!.gitignore
!README.md
!index.html
+/advancedhrm
+/ship2bill
+
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 5f639e2e565..3dfa10e84fc 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -223,6 +223,42 @@ if (empty($reshook)) {
$uploaddir = $conf->eventorganization->dir_output;
include DOL_DOCUMENT_ROOT.'/eventorganization/core/actions_massactions_mail.inc.php';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
+
+ if ($permissiontoadd && (($action == 'setstatus' && $confirm == "yes") || $massaction == 'setstatus')) {
+ $db->begin();
+ $error = 0;$nbok = 0;
+ $objecttmp = new $objectclass($db);
+ foreach ($toselect as $key => $idselect) {
+ $result = $objecttmp->fetch($idselect);
+ if ($result > 0) {
+ $objecttmp->status = GETPOST("statusmassaction", 'int');
+ $result = $objecttmp->update($user);
+ if ($result <= 0) {
+ setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
+ $error++;
+ break;
+ } else {
+ $nbok++;
+ }
+ } else {
+ setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
+ $error ++;
+ break;
+ }
+ }
+ if (empty($error)) {
+ if ($nbok > 1) {
+ setEventMessages($langs->trans("RecordsUpdated", $nbok), null, 'mesgs');
+ } elseif ($nbok > 0) {
+ setEventMessages($langs->trans("RecordUpdated", $nbok), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("NoRecordUpdated"), null, 'mesgs');
+ }
+ $db->commit();
+ } else {
+ $db->rollback();
+ }
+ }
}
@@ -680,6 +716,9 @@ $arrayofmassactions = array(
if (!empty($permissiontodelete)) {
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
}
+if (!empty($permissiontoadd)) {
+ $arrayofmassactions['presetstatus'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("ModifyStatus");
+}
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
$arrayofmassactions = array();
}
@@ -716,6 +755,20 @@ $trackid = 'conferenceorbooth_'.$object->id;
$withmaindocfilemail = 0;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
+if ($massaction == 'presetstatus') {
+ $formquestion = array();
+ $statuslist[$objecttmp::STATUS_DRAFT] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DRAFT);
+ $statuslist[$objecttmp::STATUS_SUGGESTED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_SUGGESTED);
+ $statuslist[$objecttmp::STATUS_CONFIRMED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CONFIRMED);
+ $statuslist[$objecttmp::STATUS_NOT_QUALIFIED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_NOT_QUALIFIED);
+ $statuslist[$objecttmp::STATUS_DONE] = $objecttmp->LibStatutEvent($objecttmp::STATUS_DONE);
+ $statuslist[$objecttmp::STATUS_CANCELED] = $objecttmp->LibStatutEvent($objecttmp::STATUS_CANCELED);
+ $formquestion[] = array('type' => 'other',
+ 'name' => 'affectedcommercial',
+ 'label' => $form->editfieldkey('ModifyStatus', 'status_id', '', $object, 0),
+ 'value' => $form->selectarray('statusmassaction', $statuslist, GETPOST('statusmassaction')));
+ print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmModifyStatus"), $langs->trans("ConfirmModifyStatusQuestion", count($toselect)), "setstatus", $formquestion, 1, 0, 200, 500, 1);
+}
if ($search_all) {
$setupstring = '';
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index 83ff8f6ba16..35a9d37443c 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -52,7 +52,6 @@ class Fichinter extends CommonObject
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>70),
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
- 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
'dateo' =>array('type'=>'date', 'label'=>'Dateo', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'datee' =>array('type'=>'date', 'label'=>'Datee', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'datet' =>array('type'=>'date', 'label'=>'Datet', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
@@ -64,6 +63,7 @@ class Fichinter extends CommonObject
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>130),
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
+ 'fk_statut' =>array('type'=>'integer', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
);
/**
diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php
index 39dcdd9589d..540534f34f6 100644
--- a/htdocs/fichinter/stats/index.php
+++ b/htdocs/fichinter/stats/index.php
@@ -230,10 +230,10 @@ print img_picto('', 'user', 'class="pictofixedwidth"');
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
// Status
print '
'.$langs->trans("Status").'
';
-$tmp = $objectstatic->LibStatut(0); // To force load of $this->statuts_short
-$liststatus = $objectstatic->statuts_short;
+$tmp = $objectstatic->LibStatut(0); // To force load of $this->labelStatus
+$liststatus = $objectstatic->labelStatus;
if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) {
- unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1
+ unset($liststatus[$objectstatic::STATUS_BILLED]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1
}
print $form->selectarray('object_status', $liststatus, $object_status, 1, 0, 0, '', 1);
print '
';
diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql
index 6e0102c6fbf..7719b9f9f21 100644
--- a/htdocs/install/mysql/data/llx_c_chargesociales.sql
+++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql
@@ -80,8 +80,7 @@ insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10203, 'Ασφαλιστικές εισφορές (ΕΦΚΑ)', 1, 1, 'ΕΦΚΑ');
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10204, 'Προκαταβολή Φόρου Εισοδήματος', 0, 1, 'ΕΦΟΡΙΑ');
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10205, 'Ενιαίος Φόρος Ιδιοκτησίας Ακινήτων (ΕΝ.Φ.Ι.Α) ', 0, 1, 'ΕΝΦΙΑ');
-insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο
-Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ');
+insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ');
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10207, 'Επαγγελματικό Επιμελητήριο', 1, 1, 'ΕΕ');
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10208, 'Εμπορικό και Βιομηχανικό Επιμελητηρίο', 1, 1, 'ΕΒΕ');
insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10209, 'Τέλη Κυκλοφορίας', 1, 1,'ΤΕΛΗ');
diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql
new file mode 100644
index 00000000000..abd778f71aa
--- /dev/null
+++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql
@@ -0,0 +1,37 @@
+
+--
+-- Be carefull to requests order.
+-- This file must be loaded by calling /install/index.php page
+-- when current version is 18.0.0 or higher.
+--
+-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
+-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
+-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
+-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
+-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
+-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
+-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
+-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
+-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
+-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table;
+-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex;
+-- To make pk to be auto increment (mysql):
+-- -- VMYSQL4.3 ALTER TABLE llx_table ADD PRIMARY KEY(rowid);
+-- -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
+-- To make pk to be auto increment (postgres):
+-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
+-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid);
+-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq');
+-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table;
+-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL;
+-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
+-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL;
+-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL;
+-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
+-- Note: fields with type BLOB/TEXT can't have default value.
+-- To rebuild sequence for postgresql after insert by forcing id autoincrement fields:
+-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences();
+
+
+- V19
+ALTER TABLE llx_ticket ADD COLUMN fk_contract integer DEFAULT 0 after fk_project;
diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql
index df3f6384d23..d327bd56183 100644
--- a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql
+++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql
@@ -35,6 +35,7 @@ CREATE TABLE llx_bookcal_booking(
lastname varchar(128) NOT NULL,
email varchar(128) NOT NULL,
start datetime NOT NULL,
- duration integer NOT NULL
+ duration integer NOT NULL,
+ fk_bookcal_availability integer NOT NULL
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql
index ec3465a6c2d..32afd3c575b 100644
--- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql
+++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql
@@ -27,12 +27,12 @@ create table llx_stock_mouvement
eatby date DEFAULT NULL, -- Eatby date (deprecated, we should get value from batch number in table llx_product_lot)
sellby date DEFAULT NULL, -- Sellby date (deprecated, we should get value from batch number in table llx_product_lot)
fk_entrepot integer NOT NULL, -- Id warehouse
- value real, -- Qty of movement
- price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value)
- type_mouvement smallint, -- Type/Direction of movement
- fk_user_author integer, -- Id user making movement
- label varchar(255), -- Comment on movement
- inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking)
+ value real, -- Qty of movement
+ price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value)
+ type_mouvement smallint, -- Type/Direction of movement (manual entry = 0, manual exit = 1, automatic exit = 2, automatic entry = 3)
+ fk_user_author integer, -- Id user making movement
+ label varchar(255), -- Comment on movement
+ inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking)
fk_project integer,
fk_origin integer,
origintype varchar(64),
diff --git a/htdocs/install/mysql/tables/llx_ticket-ticket.sql b/htdocs/install/mysql/tables/llx_ticket-ticket.sql
index c651eaccca2..dc7ab197735 100644
--- a/htdocs/install/mysql/tables/llx_ticket-ticket.sql
+++ b/htdocs/install/mysql/tables/llx_ticket-ticket.sql
@@ -1,5 +1,6 @@
-- SQL definition for module ticket
-- Copyright (C) 2013 Jean-François FERRY
+-- Copyright (C) 2023 Charlene Benke
--
-- 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
@@ -22,6 +23,7 @@ CREATE TABLE llx_ticket
track_id varchar(128) NOT NULL,
fk_soc integer DEFAULT 0,
fk_project integer DEFAULT 0,
+ fk_contract integer DEFAULT 0,
origin_email varchar(128),
fk_user_create integer,
fk_user_assign integer,
diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php
index f4aeaad2c36..5181f979ea6 100644
--- a/htdocs/knowledgemanagement/knowledgerecord_list.php
+++ b/htdocs/knowledgemanagement/knowledgerecord_list.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2007-2023 Laurent Destailleur
* Copyright (C) 2021 Frédéric France
* Copyright (C) 2023 Anthony Berton
*
@@ -519,7 +519,7 @@ if (empty($reshook)) {
if (!empty($moreforfilter)) {
print '
';
print $moreforfilter;
- $parameters = array('type'=>$type);
+ $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '
';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 21cc6602048..9e1ccef84e2 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -365,10 +365,10 @@ GenericMaskCodes=You may enter any numbering mask. In this mask, the following t
GenericMaskCodes2={cccc} the client code on n characters {cccc000} the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter. {tttt} The code of third party type on n characters (see menu Home - Setup - Dictionary - Types of third parties). If you add this tag, the counter will be different for each type of third party.
GenericMaskCodes3=All other characters in the mask will remain intact. Spaces are not allowed.
GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13). Spaces are not allowed. In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.
-GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2007-01-31:
-GenericMaskCodes4b=Example on third party created on 2007-03-01:
-GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099 {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX IN{yy}{mm}-{0000}-{t} will give IN0701-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI'
+GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2023-01-31:
+GenericMaskCodes4b=Example on third party created on 2023-01-31:
+GenericMaskCodes4c=Example on product created on 2023-01-31:
+GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099 {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI'
GenericNumRefModelDesc=Returns a customizable number according to a defined mask.
ServerAvailableOnIPOrPort=Server is available at address %s on port %s
ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s
@@ -394,7 +394,7 @@ ListOfDirectoriesForModelGenODT=List of directories containing templates files w
NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories
ExampleOfDirectoriesForModelGen=Examples of syntax: c:\\myapp\\mydocumentdir\\mysubdir /home/myapp/mydocumentdir/mysubdir DOL_DATA_ROOT/ecm/ecmdir
FollowingSubstitutionKeysCanBeUsed= To know how to create your odt document templates, before storing them in those directories, read wiki documentation:
-FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template
+FullListOnOnlineDocumentation=https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template
FirstnameNamePosition=Position of Name/Lastname
DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values:
KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices)
@@ -542,7 +542,7 @@ DAV_ALLOW_PUBLIC_DIR=Enable the generic public directory (WebDAV dedicated direc
DAV_ALLOW_PUBLIC_DIRTooltip=The generic public directory is a WebDAV directory anybody can access (in read and write mode), with no authorization required (login/password account).
DAV_ALLOW_ECM_DIR=Enable the DMS/ECM private directory (root directory of the DMS/ECM module - login required)
DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploaded when using the DMS/ECM module. Similarly as access from the web interface, you will need a valid login/password with adecuate permissions to access it.
-# Modules
+##### Modules #####
Module0Name=Users & Groups
Module0Desc=Users / Employees and Groups management
Module1Name=Third Parties
@@ -712,6 +712,7 @@ Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to
Module66000Name=OAuth2 token management
Module66000Desc=Provide a tool to generate and manage OAuth2 tokens. The token can then be used by some other modules.
Module94160Name=Receptions
+##### Permissions #####
Permission11=Read customer invoices (and payments)
Permission12=Create/modify customer invoices
Permission13=Invalidate customer invoices
@@ -1439,10 +1440,10 @@ MustBeUnique=Must be unique?
MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ?
MustBeInvoiceMandatory=Mandatory to validate invoices?
TechnicalServicesProvided=Technical services provided
-#####DAV #####
+##### WebDAV #####
WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access.
WebDavServer=Root URL of %s server: %s
-##### Webcal setup #####
+##### WebCAL setup #####
WebCalUrlForVCalExport=An export link to %s format is available at following link: %s
##### Invoices #####
BillsSetup=Invoices module setup
@@ -1641,9 +1642,9 @@ LDAPFieldEndLastSubscription=Date of subscription end
LDAPFieldTitle=Job position
LDAPFieldTitleExample=Example: title
LDAPFieldGroupid=Group id
-LDAPFieldGroupidExample=Exemple : gidnumber
+LDAPFieldGroupidExample=Example : gidnumber
LDAPFieldUserid=User id
-LDAPFieldUseridExample=Exemple : uidnumber
+LDAPFieldUseridExample=Example : uidnumber
LDAPFieldHomedirectory=Home directory
LDAPFieldHomedirectoryExample=Exemple : homedirectory
LDAPFieldHomedirectoryprefix=Home directory prefix
@@ -1834,26 +1835,26 @@ AccountancyCodeSell=Sale account. code
AccountancyCodeBuy=Purchase account. code
CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax
##### Agenda #####
-AgendaSetup=Events and agenda module setup
-PasswordTogetVCalExport=Key to authorize export link
-SecurityKey = Security Key
+AgendaSetup = Events and agenda module setup
+AGENDA_DEFAULT_FILTER_TYPE = Automatically set this type of event in search filter of agenda view
+AGENDA_DEFAULT_FILTER_STATUS = Automatically set this status for events in search filter of agenda view
+AGENDA_DEFAULT_VIEW = Which view do you want to open by default when selecting menu Agenda
+AGENDA_EVENT_PAST_COLOR = Past event color
+AGENDA_EVENT_CURRENT_COLOR = Current event color
+AGENDA_EVENT_FUTURE_COLOR = Future event color
+AGENDA_REMINDER_BROWSER = Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup).
+AGENDA_REMINDER_BROWSER_SOUND = Enable sound notification
+AGENDA_REMINDER_EMAIL = Enable event reminder by emails (remind option/delay can be defined on each event).
+AGENDA_REMINDER_EMAIL_NOTE = Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment.
+AGENDA_SHOW_LINKED_OBJECT = Show linked object into agenda view
+AGENDA_USE_EVENT_TYPE = Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events)
+AGENDA_USE_EVENT_TYPE_DEFAULT = Automatically set this default value for type of event in event create form
+PasswordTogetVCalExport = Key to authorize export link
PastDelayVCalExport=Do not export event older than
-AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events)
-AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form
-AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view
-AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view
-AGENDA_EVENT_PAST_COLOR=Past event color
-AGENDA_EVENT_CURRENT_COLOR=Current event color
-AGENDA_EVENT_FUTURE_COLOR=Future event color
-AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda
-AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup).
-AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification
-AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event).
-AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment.
-AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view
-##### Clicktodial #####
+SecurityKey = Security Key
+##### ClickToDial #####
ClickToDialSetup=Click To Dial module setup
-ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags __PHONETO__ that will be replaced with the phone number of person to call __PHONEFROM__ that will be replaced with phone number of calling person (yours) __LOGIN__ that will be replaced with clicktodial login (defined on user card) __PASS__ that will be replaced with clicktodial password (defined on user card).
+ClickToDialUrlDesc=URL called when a click on phone picto is done. In URL, you can use tags __PHONETO__ that will be replaced with the phone number of person to call __PHONEFROM__ that will be replaced with phone number of calling person (yours) __LOGIN__ that will be replaced with clicktodial login (defined on user card) __PASS__ that will be replaced with clicktodial password (defined on user card).
ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable.
ClickToDialUseTelLink=Use just a link "tel:" on phone numbers
ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface, installed on the same computer as the browser, and called when you click on a link starting with "tel:" in your browser. If you need a link that start with "sip:" or a full server solution (no need of local software installation), you must set this to "No" and fill the next field.
@@ -2066,6 +2067,7 @@ BaseCurrency=Reference currency of the company (go into setup of company to chan
WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016).
WarningNoteModulePOSForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated.
WarningInstallationMayBecomeNotCompliantWithLaw=You are trying to install module %s that is an external module. Activating an external module means you trust the publisher of that module and that you are sure that this module does not adversely impact the behavior of your application, and is compliant with laws of your country (%s). If the module introduces an illegal feature, you become responsible for the use of illegal software.
+
MAIN_PDF_MARGIN_LEFT=Left margin on PDF
MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
MAIN_PDF_MARGIN_TOP=Top margin on PDF
@@ -2110,7 +2112,7 @@ NewEmailCollector=New Email Collector
EMailHost=Host of email IMAP server
EMailHostPort=Port of email IMAP server
loginPassword=Login/Password
-oauthToken=Oauth2 token
+oauthToken=OAuth2 token
accessType=Acces type
oauthService=Oauth service
TokenMustHaveBeenCreated=Module OAuth2 must be enabled and an oauth2 token must have been created with the correct permissions (for example scope "gmail_full" with OAuth for Gmail).
@@ -2336,7 +2338,7 @@ IconOnly=Icon only - Text on tooltip only
INVOICE_ADD_ZATCA_QR_CODE=Show the ZATCA QR code on invoices
INVOICE_ADD_ZATCA_QR_CODEMore=Some Arabic countries need this QR Code on their invoices
INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices
-INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP&City are filled and that the accounts have valid Swiss/Liechtenstein IBANs.
+INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs.
INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address
INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory mention for France
UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID.
@@ -2366,12 +2368,12 @@ DefinedAPathForAntivirusCommandIntoSetup=Define a path for an antivirus program
TriggerCodes=Triggerable events
TriggerCodeInfo=Enter here the trigger code(s) that must generate a post of a web request (only external URL are allowed). You can enter several trigger codes separated by a comma.
EditableWhenDraftOnly=If unchecked, the value can only be modified when object has a draft status
-CssOnEdit=Css on edit pages
-CssOnView=Css on view pages
-CssOnList=Css on lists
-HelpCssOnEditDesc=The Css used when editing the field. Example: "minwiwdth100 maxwidth500 widthcentpercentminusx"
-HelpCssOnViewDesc=The Css used when viewing the field.
-HelpCssOnListDesc=The Css used when field is inside a list table. Example: "tdoverflowmax200"
+CssOnEdit=CSS on edit pages
+CssOnView=CSS on view pages
+CssOnList=CSS on lists
+HelpCssOnEditDesc=The CSS used when editing the field. Example: "minwiwdth100 maxwidth500 widthcentpercentminusx"
+HelpCssOnViewDesc=The CSS used when viewing the field.
+HelpCssOnListDesc=The CSS used when field is inside a list table. Example: "tdoverflowmax200"
RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions
MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions
WarningDisabled=Warning disabled
@@ -2396,4 +2398,4 @@ Defaultfortype=Default
DefaultForTypeDesc=Template used by default when creating a new email for the template type
OptionXShouldBeEnabledInModuleY=Option "%s" should be enabled into module %s
OptionXIsCorrectlyEnabledInModuleY=Option "%s" is enabled into module %s
-AtBottomOfPage=At bottom of page
\ No newline at end of file
+AtBottomOfPage=At bottom of page
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 11a65a351bf..12388f6b9d1 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -304,7 +304,7 @@ ErrorValueForTooLow=Value for %s is too low
ErrorValueCantBeNull=Value for %s can't be null
ErrorDateOfMovementLowerThanDateOfFileTransmission=The date of the bank transaction can't be lower than the date of the file transmission
ErrorTooMuchFileInForm=Too much files in form, the maximum number is %s file(s)
-ErrorSessionInvalidatedAfterPasswordChange=The session was been invalidated following a change of password, status or dates of validity. Please relogin.
+ErrorSessionInvalidatedAfterPasswordChange=The session was been invalidated following a change of password, email, status or dates of validity. Please relogin.
ErrorExistingPermission = Permission %s for object %s already exists
ErrorFieldExist=The value for %s already exist
ErrorEqualModule=Module invalid in %s
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 894c9de4f13..4c9fd31b896 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -175,3 +175,9 @@ NoPublicActionsAllowedForThisEvent=No public actions are open to public for this
MaxNbOfAttendees=Max number of attendees
DateStartEvent=Event start date
DateEndEvent=Event end date
+ModifyStatus=Modify status
+ConfirmModifyStatus=Confirm status modification
+ConfirmModifyStatusQuestion=Are you sure you want to modify the %s selected record(s)?
+RecordsUpdated = %s Records updated
+RecordUpdated = Record updated
+NoRecordUpdated = No Record updated
\ No newline at end of file
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 55f27b6db33..ab6179f525c 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1229,4 +1229,6 @@ PublicVirtualCard=Virtual business card
TreeView=Tree view
DropFileToAddItToObject=Drop a file to add it to this object
UploadFileDragDropSuccess=The file(s) have been uploaded successfully
-SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contain' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <=, >= or != before the value, to filter using a mathematical comparison
\ No newline at end of file
+SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contain' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <=, >= or != before the value, to filter using a mathematical comparison
+InProgress=In progress
+
\ No newline at end of file
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index d73eb5f831b..92105e3b63e 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -122,3 +122,4 @@ BOMServicesList=BOM's services
Manufacturing=Manufacturing
Disassemble=Disassemble
ProducedBy=Produced by
+QtyTot=Qty Total
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 5f9ca0e1f5e..00b1b34d492 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -67,7 +67,6 @@ ExportDataset_ticket_1=Tickets
# Status
Read=Read
Assigned=Assigned
-InProgress=In progress
NeedMoreInformation=Waiting for reporter feedback
NeedMoreInformationShort=Waiting for feedback
Answered=Answered
@@ -250,8 +249,10 @@ TicketAssignedEmailBody=You have been assigned the ticket #%s by %s
TicketAssignedCustomerEmail=Your ticket has been assigned for processing.
TicketAssignedCustomerBody=This is an automatic email to confirm your ticket has been assigned for processing.
MarkMessageAsPrivate=Mark message as private
-TicketMessageSendEmailHelp=An email will be sent to all assigned contact (internal contacts, but also external contacts except if the option "%s" is checked)
-TicketMessagePrivateHelp=This message will not display to external users
+TicketMessageSendEmailHelp=An email will be sent to all assigned contact
+TicketMessageSendEmailHelp2a=(internal contacts, but also external contacts except if the option "%s" is checked)
+TicketMessageSendEmailHelp2b=(internal contacts, but also external contacts)
+TicketMessagePrivateHelp=This message will not be visible to external users
TicketMessageRecipientsHelp=Recipient field completed with active contacts linked to the ticket
TicketEmailOriginIssuer=Issuer at origin of the tickets
InitialMessage=Initial Message
diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang
index 2ab780bf472..2dc05f8c5e5 100644
--- a/htdocs/langs/fr_FR/errors.lang
+++ b/htdocs/langs/fr_FR/errors.lang
@@ -304,7 +304,7 @@ ErrorValueForTooLow=La valeur pour %s est trop faible
ErrorValueCantBeNull=La valeur pour %s ne peut pas être nulle
ErrorDateOfMovementLowerThanDateOfFileTransmission=La date de l'opération bancaire ne peut être inférieure à la date de transmission du fichier
ErrorTooMuchFileInForm=Trop de fichiers dans le formulaire, le nombre maximum est de %s fichier(s)
-ErrorSessionInvalidatedAfterPasswordChange=La session a été invalidée suite à un changement de mot de passe, d'état ou de dates de validité. Veuillez vous reconnecter.
+ErrorSessionInvalidatedAfterPasswordChange=La session a été invalidée suite à un changement de mot de passe, email, statut ou de dates de validité. Veuillez vous reconnecter.
ErrorExistingPermission = La permission %s pour l'objet %s existe déjà.
ErrorFieldExist=La valeur pour %s existe déjà
ErrorEqualModule=Module invalide dans %s.
diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang
index f4ad2b4a6b6..34deaa9f553 100644
--- a/htdocs/langs/fr_FR/mrp.lang
+++ b/htdocs/langs/fr_FR/mrp.lang
@@ -122,3 +122,5 @@ BOMServicesList=Les services de BOM
Manufacturing=Fabrication
Disassemble=Déassemblage
ProducedBy=Produit par
+QtyTot=Qty Total
+InProgress=En cours
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index 37b3e6da247..ecfc83a2f82 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -260,7 +260,7 @@ class MyObject extends CommonObject
}
// Example to show how to set values of fields definition dynamically
- /*if ($user->hasRights->('mymodule', 'myobject', 'read')) {
+ /*if ($user->hasRight('mymodule', 'myobject', 'read')) {
$this->fields['myfield']['visible'] = 1;
$this->fields['myfield']['noteditable'] = 0;
}*/
diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index 675c3363576..52f93870619 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -423,7 +423,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$object->fetch_product();
- $numref = $object->getNextNumRef($object->fk_product);
+ $numref = $object->getNextNumRef($object->product);
} else {
$numref = $object->ref;
}
diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php
index 1d81a4d137e..4ab5563a591 100644
--- a/htdocs/mrp/mo_list.php
+++ b/htdocs/mrp/mo_list.php
@@ -625,7 +625,7 @@ while ($i < $imaxinloop) {
$objectBom = $bom->fetch($obj->fk_bom);
// Output Kanban
- print $object->getKanbanView('', array('bom'=>$objectBom->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected)));
+ print $object->getKanbanView('', array('bom'=>$bom->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected)));
if ($i == ($imaxinloop - 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)) {
+ if (in_array($objp->rowid, $arrayofselected)) {
$selected = 1;
}
- print '';
+ print '';
}
print '
';
if (!$i) {
diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index d50bc18237e..c697657c906 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -182,7 +182,7 @@ if (empty($reshook)) {
$resultline = $moline->create($user, false); // Never use triggers here
if ($resultline <= 0) {
$error++;
- setEventMessages($moline->error, $molines->errors, 'errors');
+ setEventMessages($moline->error, $moline->errors, 'errors');
}
$action = '';
@@ -488,7 +488,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$object->fetch_product();
- $numref = $object->getNextNumRef($object->fk_product);
+ $numref = $object->getNextNumRef($object->product);
} else {
$numref = $object->ref;
}
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index c53694d6c81..ae9054a033d 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -454,6 +454,30 @@ if (empty($reshook)) {
}
}
+ // Quick edit for extrafields
+ if ($action == 'update_extras') {
+ $object->oldcopy = dol_clone($object);
+
+ // Fill array 'array_options' with data from update form
+ $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml'));
+ if ($ret < 0) {
+ $error++;
+ }
+
+ if (!$error) {
+ // Actions on extra fields
+ $result = $object->insertExtraFields('PRODUCT_MODIFY');
+ if ($result < 0) {
+ setEventMessages($object->error, $object->errors, 'errors');
+ $error++;
+ }
+ }
+
+ if ($error) {
+ $action = 'edit_extras';
+ }
+ }
+
// Add a product or service
if ($action == 'add' && $usercancreate) {
$error = 0;
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 386e7353510..2e6f9bc07c5 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -488,6 +488,19 @@ class Product extends CommonObject
*/
public $supplierprices;
+ /**
+ * Array with list of sub-products for Kits
+ *
+ * @var array
+ */
+ public $sousprods;
+
+ /**
+ * Path of subproducts. Build from ->sousprods with get_arbo_each_prod()
+ */
+ public $res;
+
+
/**
* Property set to save result of isObjectUsed(). Used for example by Product API.
*
@@ -497,8 +510,6 @@ class Product extends CommonObject
/**
- *
- *
*
*/
public $mandatory_period;
@@ -4730,7 +4741,7 @@ class Product extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Fonction recursive uniquement utilisee par get_arbo_each_prod, recompose l'arborescence des sousproduits
+ * Function recursive, used only by get_arbo_each_prod(), to build tree of subproducts into ->res
* Define value of this->res
*
* @param array $prod Products array
@@ -4808,16 +4819,16 @@ class Product extends CommonObject
public function get_arbo_each_prod($multiply = 1, $ignore_stock_load = 0)
{
// phpcs:enable
- $res = array();
+ $this->res = array();
if (isset($this->sousprods) && is_array($this->sousprods)) {
foreach ($this->sousprods as $prod_name => $desc_product) {
if (is_array($desc_product)) {
- $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load);
+ $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); // This set $this->res
}
}
}
//var_dump($res);
- return $res;
+ return $this->res;
}
/**
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 01218283092..9996ad26bfe 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -652,7 +652,7 @@ if ($id > 0 || $ref) {
}
$price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_supplier_price_expression ? $object->fk_supplier_price_expression : '0');
print $form->selectarray('eid', $price_expression_list, $price_expression_preselection);
- print '
'.$langs->trans("PriceExpressionEditor").'
';
+ print '
'.$langs->trans("PriceExpressionEditor").'
';
print '';
// This code hides the numeric price input if is not selected, loads the editor page if editor button is pressed
print '