diff --git a/ChangeLog b/ChangeLog
index b468ebcc931..f4945b44df0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,20 +10,176 @@ For users:
---------------
NEW: PHP 8.1 compatibility
-
-
+NEW: Support for recurring purchase invoices.
+NEW: #20292 Include German public holidays
+NEW: #17123 added ExtraFields for Stock Mouvement
+NEW: #20609 : new massaction to assign a sale representatives on a selection of thirdparties
+NEW: #20653 edit discount pourcentage for all lines in one shot
+NEW: Accept 'auto' for ref of object on import of purchase order/proposal
+NEW: Accountancy - Add more filters and info on page to bind accounting accounts
+NEW: Accountancy - Add subledger account when we generate a transaction with a deposit invoice
+NEW: Accountancy - Add a massaction to preselect an account (customer and supplier list)
+NEW: ACE Editor is restored at same cursor position after a save.
+NEW: Add "addMoreActionsButtons" hook to subscription form
+NEW: Add an option in GUI to show a Quick add button into top menu bar
+NEW: Module Recruitment - Add a public page with all list of open job positions.
+NEW: Module Recruitment - Add a tab with list of application on the jobposition file.
+NEW: Add a workflow to auto link contract on a ticket
+NEW: Add column date of Signature on proposal list
+NEW: Add column template invoice in invoice list
+NEW: Add column "Total HT" to products array on document creation card
+NEW: ADD configuration for text color of button action
+NEW: Add constant to hide categories in TakePos
+NEW: Add constant to show category description in TakePos
+NEW: Add constant to show only the products in stock in TakePos
+NEW: Add entity filter in exports
+NEW: Show the event block on recurring invoices #20870
+NEW: Add filter "opportunity status" on statistics of projects.
+NEW: Add firstname, lastname and max number of attendees for module "Event Organization"
+NEW: add margin info in proposal and order list
+NEW: Add massaction "Edit Extrafield" for Product
+NEW: Add more fields to detect duplicate during import of thirdparties
+NEW: Add option to foce delivery on email for purchase order receipt to yes
+NEW: Add param boder table for md theme
+NEW: Add param color button action
+NEW: Add possibility to create contract from invoice
+NEW: Add possibility with constant MAIN_LOGIN_BADCHARUNAUTHORIZED to define bad character unauthorized into login name
+NEW: Add private and public notes on tax files.
+NEW: Add status "Obsolete" to KM articles
+NEW: Add substitutions "user numbers"
+NEW: Add the possibility to add sub-BOMs to BOM
+NEW: allow a ticket to be automatically marked as read when created from backend.
+NEW: allow cut&paste as real numeric value to excel
+NEW: A public form to send a message and create a lead is available
+NEW: automatically set totally received status in reception
+NEW: Auto set invoice paid when adding credit not and remain to pay is 0
+NEW: Availibility dictionnary has a new column unit and number
+NEW: barcode rule to insert product in takepos
+NEW: Can change value of AWP during the inventory
+NEW: Can enter price with tax for predefined products on purchase objects
+NEW: Can filter on a thirdparty on product statistics
+NEW: Can removed doc templates from setup page of thirdparty
+NEW: Can set the parent company during the creation of thirdparty (action=add of societe/card.php)
+NEW: Can use ! to make a search that exclude a string
+NEW: Change in theme colors does not need to use the refresh button
+NEW: clean values and amount in FEC import
+NEW: const MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND for mailing mass action
+NEW: Contact filter project list
+NEW: Create contract from invoice
+NEW: create third-party with contact if not found on public ticket
+NEW: Default value for MAIN_SECURITY_CSRF_WITH_TOKEN is now 2 (GET are also protected agains CSRF attacks)
+NEW: deposit payment terms: add field into dictionary admin page to define default percentage of deposit.
+NEW: Dictionaries - add possibility to manage countries in EEC
+NEW: display errors in a message box after generating documents
+NEW: Display physical and virtual stock of the products when creating OF from a BOM
+NEW: Display product ref in "Object link" product tab for BOM
+NEW: Enhance the import. Can use 'auto' for the ref (import of orders)
+NEW: Events on Proposal to Return to Draft
+NEW: Page to list expense report payments
+NEW: JS inventory autocalc input
+NEW: language support for more emailing target selectors
+NEW: leave requests: add field into type dictionary to block request if balance is negative
+NEW: MAIN_MAIL_AUTOCOPY_TO can accept several email and special keys
+NEW: MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category
+NEW: Mass action "Close shipments"
+NEW: Module website now supports the multicompany module
+NEW: More mode for THEME_TOPMENU_DISABLE_IMAGE (2, 3, ...)
+NEW: Add option to move checkbox column as first column on Thirdparty list (only few screens)
+NEW: Add tabs for nets Bom
+NEW: on redirect of page in website module, GET parameters are kept.
+NEW: optional display warning icons on ticket list
+NEW: option to default check "notify tier at creation" in ticket module
+NEW: option update prices on proposal cloning
+NEW: payment conditions enabling semi-automatic deposit creation (Issue #18439)
+NEW: possibility to consume multiple batch
+NEW: Reverse movement product consumption
+NEW: Send email to the supplier order contact
+NEW: New permission to report time on timesheet.
+NEW: SEPA XML - option to place payment Type Info at Credit transfer Transaction level
+NEW: Show number of votes into the label of tab "Results" of a survey
+NEW: Show product reference in Takepos
+NEW: Some core tables are created only at module activation
+NEW: split consumption line on MO
+NEW: stock filter in reassort lists
+NEW: stock limit in stock export CSV
+NEW: Sub-bom are availables
+NEW: Supplier order - Show ref supplier of reception in linked object block
+NEW: support user_modif in order
+NEW: TakePos - pagination on search results
+NEW: The backup tools has an "lowmemory" option for mysqldump on large database
+NEW: The 'reposition' class works on ajax constantonoff that make redirects
+NEW: Thirdparty - Add rules "customer accountancy code" is mandatory to validate invoice
+NEW: thumbnail field in product list
+NEW: total mark rate in list
+NEW: uncheck "send message" by default on a ticket when private messages has been checked
+NEW: VAT Report by month - Show detail by rate and also by code
+NEW: Ticket triggers: allow to automatically send messages on new tickets
+NEW: Accountancy - Add hidden feature for accounting reconciliation
+NEW: Can store the session into database (instead of beeing managed by PHP)
Modules
+NEW: Module Partnership Management
NEW: Experimental module Event Organization Management
-NEW: Experimental module Workstations Management
-NEW: Experimental module Partnership Management
-For developers:
----------------
-
-NEW: A lot of addition of hooks.
-
+For developers or integrators:
+------------------------------
+NEW: dol_uncompress() supports more extensions (.gz, .bz2, .zstd). Only .zip was supported before.
+NEW: Implement a generic method for Kaban views
+NEW: Upgrade chartjs library to 3.7.1
+NEW: update rank line is possible on API for customer invoices, sales orders and supplier invoice
+NEW: stripe element with more gateways
+NEW: solde() function evolution to be able to get solde until a chosen date
+NEW: Suggest a way to run upgrade per entities.
+NEW: Support html content for multiselect component.
+NEW: ModuleBuilder - Add tabs view in module builder
+NEW: ModuleBuilder - More feature that can be modifed after module generation
+NEW: Hook getNomUrl available everywhere in tooltip of ref links
+NEW: Identification of tr is possible with by attribute data-id on some pages
+NEW: Import with select boxes V2
+NEW: Can update rank of invoice, proposal and order lines with API update
+NEW: Can use current entity filter on 'chkbxlst'
+NEW: Creation of the function select_bom() used to display bom select list
+NEW: add printFieldListWhere hook in product reassort card
+NEW: Add trigger and event on completely received status change
+NEW: Add utility function send backup by mail
+NEW: add WordPress OAuth to save a token (not SSO)
+NEW: A module can embed a sql script run at each Dolibarr upgrade
+NEW: API Proposals - Add POST lines
+NEW: API REST filter states by country
+NEW: Add option INVOICEREC_SET_AUTOFILL_DATE_START/END
+NEW: Add option MAIN_API_DEBUG to save API logs into a file
+NEW: Add param to keep the robot=index meta tag on public pages
+NEW: Add method hintindex() in database handlers.
+NEW: add modifications for new function "$db->prefix()"
+NEW: addMoreActionsButtonsList hook for button in list
+NEW: Add API to get a template invoice
+NEW: Standardize a lot of code.
+NEW: #20736 Allow extrafields SQL filters on REST API product lookup
+NEW: #19294 implement detailed timespent in task of project API
+NEW: Add a protection into PHPunit to avoid to forget a var_dump
+NEW: Add datem and type parameters to API to create movements
+NEW: Add hidden option on contract PDF line to hide qty and price
+NEW: Option MAIL_MASS_ACTION_ADD_LAST_IF_MAIN_DOC_NOT_FOUND to send last document in mass mailing action
+NEW: Add hooks: selectContactListWhere hook, selectThirdpartyListWhere hook
+NEW: TakePos - add hooks complete product display
+NEW: TakePos - add hooks for cart display
+NEW: TakePos - add hooks to complete ajax return array
+NEW: Add hook before the public ticket list
+NEW: Add hook doaction in takepos invoice
+NEW: Add Hook for Notif
+NEW: Add hook for more buttons
+NEW: Add hook printFieldListWhere in "show_contacts" function
+NEW: Add hook printFieldWhere in load_state_board function
+NEW: Add hooks contact tab badge and hooks parameter for avoid conflicts
+NEW: Add hook selectProductsListWhere in select_produits_list function
+NEW: Add hooks in commercial index
+NEW: Add hooks in customers and products boxes
+NEW: Add hooks in thirdparty index page
+NEW: Add hooks on project task time page
+NEW: Add hooks on salaries and sociales card
+NEW: Add hooks select product list and select thirdparty list function
+NEW: Add hook to getSellPrice function
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index 3c2e8763fe1..7a65fa0ffaa 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -349,7 +349,7 @@ if ($action != 'export_csv') {
$sql .= " GROUP BY t.numero_compte";
$resql = $db->query($sql);
- $nrows = $resql->num_rows;
+ $nrows = $db->num_rows($resql);
$opening_balances = array();
for ($i = 0; $i < $nrows; $i++) {
$arr = $resql->fetch_array();
diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php
index 0d95ff61763..49b4fc2c98c 100644
--- a/htdocs/accountancy/journal/variousjournal.php
+++ b/htdocs/accountancy/journal/variousjournal.php
@@ -43,17 +43,6 @@ if ($in_bookkeeping == '') {
$in_bookkeeping = 'notyet';
}
-// Security check
-if (empty($conf->accounting->enabled)) {
- accessforbidden();
-}
-if ($user->socid > 0) {
- accessforbidden();
-}
-if (empty($user->rights->accounting->mouvements->lire)) {
- accessforbidden();
-}
-
// Get information of journal
$object = new AccountingJournal($db);
$result = $object->fetch($id_journal);
@@ -65,7 +54,7 @@ if ($result > 0) {
accessforbidden($langs->trans('ErrorRecordNotFound'));
}
-$hookmanager->initHooks(array('globaljournal', $object->nature_text . 'journal'));
+$hookmanager->initHooks(array('globaljournal', $object->nature.'journal'));
$parameters = array();
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
@@ -93,6 +82,18 @@ if (!is_array($journal_data)) {
setEventMessages($object->error, $object->errors, 'errors');
}
+// Security check
+if (empty($conf->accounting->enabled)) {
+ accessforbidden();
+}
+if ($user->socid > 0) {
+ accessforbidden();
+}
+if (empty($user->rights->accounting->mouvements->lire)) {
+ accessforbidden();
+}
+
+
/*
* Actions
*/
diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 350713ca17e..88a63af0ae1 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -2030,7 +2030,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$MAX = 10;
- $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id);
+ $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id);
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index c2ef4583bdc..72f75cdf4c8 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -305,6 +305,8 @@ $formother = new FormOther($db);
$membertypestatic = new AdherentType($db);
$memberstatic = new Adherent($db);
+$title = $langs->trans("Members");
+
$now = dol_now();
if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
@@ -471,42 +473,41 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
exit;
}
-llxHeader('', $langs->trans("Member"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
+llxHeader('', $title, 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
-$titre = $langs->trans("MembersList");
if (GETPOSTISSET("search_status")) {
if ($search_status == '-1,1') { // TODO : check this test as -1 == Adherent::STATUS_DRAFT and -2 == Adherent::STATUS_EXLCUDED
- $titre = $langs->trans("MembersListQualified");
+ $title = $langs->trans("MembersListQualified");
}
if ($search_status == Adherent::STATUS_DRAFT) {
- $titre = $langs->trans("MembersListToValid");
+ $title = $langs->trans("MembersListToValid");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == '') {
- $titre = $langs->trans("MenuMembersValidated");
+ $title = $langs->trans("MenuMembersValidated");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'withoutsubscription') {
- $titre = $langs->trans("MembersWithSubscriptionToReceive");
+ $title = $langs->trans("MembersWithSubscriptionToReceive");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'uptodate') {
- $titre = $langs->trans("MembersListUpToDate");
+ $title = $langs->trans("MembersListUpToDate");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'outofdate') {
- $titre = $langs->trans("MembersListNotUpToDate");
+ $title = $langs->trans("MembersListNotUpToDate");
}
if ((string) $search_status == (string) Adherent::STATUS_RESILIATED) { // The cast to string is required to have test false when search_status is ''
- $titre = $langs->trans("MembersListResiliated");
+ $title = $langs->trans("MembersListResiliated");
}
if ($search_status == Adherent::STATUS_EXCLUDED) {
- $titre = $langs->trans("MembersListExcluded");
+ $title = $langs->trans("MembersListExcluded");
}
} elseif ($action == 'search') {
- $titre = $langs->trans("MembersListQualified");
+ $title = $langs->trans("MembersListQualified");
}
if ($search_type > 0) {
$membertype = new AdherentType($db);
$result = $membertype->fetch($search_type);
- $titre .= " (".$membertype->label.")";
+ $title .= " (".$membertype->label.")";
}
$param = '';
@@ -623,7 +624,7 @@ print '';
print '';
print '';
-print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "Information";
$modelmail = "member";
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 8ed6615965b..dbf4ca53686 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -529,7 +529,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
$moreforfilter .= dolGetButtonTitle($langs->trans('CheckForModuleUpdate'), $langs->trans('CheckForModuleUpdate').'
'.$langs->trans('CheckForModuleUpdateHelp'), 'fa fa-sync', $_SERVER["PHP_SELF"].'?action=checklastversion&token='.newToken().'&mode='.$mode.$param, '', 1, array('morecss'=>'reposition'));
$moreforfilter .= dolGetButtonTitleSeparator();
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', ($mode == 'commonkanban' ? 2 : 1), array('morecss'=>'reposition'));
- $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', ($mode == 'common' ? 2 : 1), array('morecss'=>'reposition'));
+ $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', ($mode == 'common' ? 2 : 1), array('morecss'=>'reposition'));
$moreforfilter .= '';
//$moreforfilter .= '
| '.$langs->trans("Parameters").' | '."\n"; -print ''.$langs->trans("Value").' | '."\n"; +print ''.$langs->trans("Value").' | '."\n"; print ''; @@ -106,6 +106,15 @@ if (empty($conf->use_javascript_ajax)) { print ' |
| '.$langs->trans('EnableResourceUsedInEventCheck').' | '; +print ''; +echo ajax_constantonoff('RESOURCE_USED_IN_EVENT_CHECK'); +print ' | '; +print ''; +print ' | |
| '.$langs->trans('DisabledResourceLinkUser').' | '; print ''; @@ -122,15 +131,7 @@ echo ajax_constantonoff('RESOURCE_HIDE_ADD_CONTACT_THIPARTY'); print ' | '; print ''; print ' | |
| '.$langs->trans('EnableResourceUsedInEventCheck').' | '; -print ''; -echo ajax_constantonoff('RESOURCE_USED_IN_EVENT_CHECK'); -print ' | '; -print ''; -print ' |
| global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired titlefieldcreate"' : '').'>'.$langs->trans("Label").' | |||
| '.$langs->trans("Date").' | '; - $datep = ($datep ? $datep : (is_null($object->datep) ? '' : $object->datep)); - if (GETPOST('datep', 'int', 1)) { - $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 'tzuser'); - } - $datef = ($datef ? $datef : $object->datef); - if (GETPOST('datef', 'int', 1)) { - $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 'tzuser'); - } - if (empty($datef) && !empty($datep)) { - if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) { - $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h'); - } - } - - // Date start - print ' | ||
| '; - print ''.$langs->trans("DateActionStart").''; - print ' - '; - print ''.$langs->trans("DateActionEnd").''; - print ' | '; - if (GETPOST("afaire") == 1) { - print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); // Empty value not allowed for start date and hours if "todo" - } else { - print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); - } - print ' - '; - //print ' - '; - if (GETPOST("afaire") == 1) { - print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel'); - } else { - print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel'); - } - print ' | ||
| '; - print ''.$langs->trans("DateActionEnd").''; - print ' | '; - print ''; - if (GETPOST("afaire") == 1) { - print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); - } else { - print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); - } - print ' | ||
| '; + //print ' | |||
| ';
+ print ' ';
+ print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"');
print '';
$selectedrecurrulefreq = 'no';
$selectedrecurrulebymonthday = '';
@@ -1120,34 +1084,51 @@ if ($action == 'create') {
});
});
';
- print ' | |||
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | '; - print ''; - $percent = $complete !=='' ? $complete : -1; - if (GETPOSTISSET('status')) { - $percent = GETPOST('status'); - } elseif (GETPOSTISSET('percentage')) { - $percent = GETPOST('percentage', 'int'); - } else { - if ($complete == '0' || GETPOST("afaire") == 1) { - $percent = '0'; - } elseif ($complete == 100 || GETPOST("afaire") == 2) { - $percent = 100; - } - } - $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ' | ||
| '.$langs->trans("Location").' | |||
| '; + /* + print ''.$langs->trans("DateActionStart").''; + print ' - '; + print ''.$langs->trans("DateActionEnd").''; + */ + print ' | '; + if (GETPOST("afaire") == 1) { + print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); // Empty value not allowed for start date and hours if "todo" + } else { + print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuserrel'); + } + print ' - '; + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel'); + } else { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', 'tzuserrel'); + } + print ' | ||
| '.$langs->trans("ActionAffectedTo").' | '; + print ' | ||
| '.$langs->trans("ActionAffectedTo").' | '; $listofuserid = array(); $listofcontactid = array(); $listofotherid = array(); @@ -1181,6 +1162,29 @@ if ($action == 'create') { print ' | ||
| '.$langs->trans("Location").' | |||
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | '; + print ''; + $percent = $complete !=='' ? $complete : -1; + if (GETPOSTISSET('status')) { + $percent = GETPOST('status'); + } elseif (GETPOSTISSET('percentage')) { + $percent = GETPOST('percentage', 'int'); + } else { + if ($complete == '0' || GETPOST("afaire") == 1) { + $percent = '0'; + } elseif ($complete == 100 || GETPOST("afaire") == 2) { + $percent = 100; + } + } + $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); + print ' | ||
| '.$langs->trans("Categories").' | '; @@ -1523,6 +1527,7 @@ if ($id > 0) { if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ' | ||
| '.$langs->trans("Type").' | '; if ($object->type_code != 'AC_OTH_AUTO') { + print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"'); print $formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ? GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto", 0, 0, 0, 1); } else { print ''; @@ -1533,40 +1538,19 @@ if ($id > 0) { } // Title - print ' | ||
| '.$langs->trans("Title").' | |||
| global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired titlefieldcreate"' : '').'>'.$langs->trans("Title").' | |||
| '.$langs->trans("EventOnFullDay").' | fulldayevent ? ' checked' : '').'> | ||
| '.$langs->trans("Date").' | fulldayevent ? ' checked' : '').'>'; + print ''; - // Date start - end - print ' | ||
| '; - print ''.$langs->trans("DateActionStart").''; - print ' - '; - print 'type_code == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").''; - print ' | '; - $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); - if (GETPOST("afaire") == 1) { - print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } elseif (GETPOST("afaire") == 2) { - print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } else { - print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } - print ' - '; - if (GETPOST("afaire") == 1) { - print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } elseif (GETPOST("afaire") == 2) { - print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } else { - print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); - } - print ' | ||
| '; + //print ' | |||
| ';
+ print ' ';
+ print img_picto($langs->trans("Recurrence"), 'recurring', 'class="paddingright2"');
print '';
$selectedrecurrulefreq = 'no';
$selectedrecurrulebymonthday = '';
@@ -1615,19 +1599,37 @@ if ($id > 0) {
});
});
';
- print ' | |||
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | '; - $percent = GETPOSTISSET("percentage") ? GETPOST("percentage", "int") : $object->percentage; - $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ' | ||
| '.$langs->trans("Location").' | |||
| '; + /*print ''.$langs->trans("DateActionStart").''; + print ' - '; + print 'type_code == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").''; + */ + print ' | '; + $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); + if (GETPOST("afaire") == 1) { + print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); + } else { + print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); } + print ' - '; + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); + } else { + print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel'); + } + print ' | ||
| '.$langs->trans("Location").' | |||
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | '; + $percent = GETPOSTISSET("percentage") ? GETPOST("percentage", "int") : $object->percentage; + $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); + print ' | ||
| '.$langs->trans("Categories").' | '; @@ -1786,7 +1800,7 @@ if ($id > 0) { print ' | ||
| '.$langs->trans("Description").' | '; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', $object->note_private, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor('note', $object->note_private, '', 120, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); $doleditor->Create(); print ' | '; + print ' | '; print dol_print_date($db->jdate($objp->datec), 'dayhour'); print ' | '; if (!$i) { @@ -865,7 +865,7 @@ if ($resql) { } } if (!empty($arrayfields['f.tms']['checked'])) { - print ''; + print ' | '; print dol_print_date($db->jdate($objp->tms), 'dayhour'); print ' | '; if (!$i) { diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 0ea9b1ba30d..b586d4c88a6 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -863,7 +863,7 @@ if ($id > 0) { /* $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', dol_buildpath('/mymodule/myobject_agenda.php', 1).'?id='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/mymodule/myobject_agenda.php', 1).'?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index ed37c72c1c4..26f8e754dd2 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -853,7 +853,7 @@ if ($id > 0) { /* $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', dol_buildpath('/mymodule/myobject_agenda.php', 1).'?id='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/mymodule/myobject_agenda.php', 1).'?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index cd664f5970e..fae36d323e3 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1550,7 +1550,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contact/agenda.php?id='.$object->id); + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/contact/agenda.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 487c075b3a1..587972fa83b 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -181,6 +181,12 @@ class Contact extends CommonObject */ public $email; + /** + * URL + * @var string + */ + public $url; + /** * Unsuscribe all : 1 = contact has globaly unsubscribe of all mass emailings * @var int @@ -315,6 +321,7 @@ class Contact extends CommonObject */ public $stcomm_picto; + /** * Constructor * diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 7265a69d1af..7ad5ceedb85 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2161,7 +2161,7 @@ if ($action == 'create') { $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 0befd4820ff..494c3cb1369 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -871,9 +871,11 @@ class Contrat extends CommonObject // multilangs if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); + $tmpproduct = new Product($this->db); + $tmpproduct->fetch($objp->fk_product); + $tmpproduct->getMultiLangs(); + + $line->multilangs = $tmpproduct->multilangs; } $this->lines[$pos] = $line; @@ -2744,6 +2746,7 @@ class ContratLigne extends CommonObjectLine public $commentaire; + const STATUS_INITIAL = 0; const STATUS_OPEN = 4; const STATUS_CLOSED = 5; @@ -2988,7 +2991,6 @@ class ContratLigne extends CommonObjectLine $this->localtax2_type = $obj->localtax2_type; $this->qty = $obj->qty; $this->remise_percent = $obj->remise_percent; - $this->remise = $obj->remise; $this->fk_remise_except = $obj->fk_remise_except; $this->subprice = $obj->subprice; $this->price_ht = $obj->price_ht; @@ -3046,7 +3048,6 @@ class ContratLigne extends CommonObjectLine $this->localtax2_tx = trim($this->localtax2_tx); $this->qty = trim($this->qty); $this->remise_percent = trim($this->remise_percent); - $this->remise = trim($this->remise); $this->fk_remise_except = (int) $this->fk_remise_except; $this->subprice = price2num($this->subprice); $this->price_ht = price2num($this->price_ht); diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index dc35cfbc7aa..e88b42950f3 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -93,12 +93,17 @@ abstract class CommonInvoice extends CommonObject const STATUS_ABANDONED = 3; + public $totalpaid; // duplicate with sumpayed + public $totaldeposits; // duplicate with sumdeposit + public $totalcreditnotes; // duplicate with sumcreditnote + public $sumpayed; public $sumpayed_multicurrency; public $sumdeposit; public $sumdeposit_multicurrency; public $sumcreditnote; public $sumcreditnote_multicurrency; + public $remaintopay; /** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e1c2bf662df..079401d045a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -115,6 +115,11 @@ abstract class CommonObject */ public $array_languages = null; // Value is array() when load already tried + /** + * @var array To sotre result of ->liste_contact() + */ + public $contacts_ids; + /** * @var mixed Array of linked objects, set and used when calling ->create() to be able to create links during the creation of object */ diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 8d577d94ca2..c45e3f1698c 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -74,6 +74,21 @@ abstract class CommonObjectLine extends CommonObject public $volume; public $volume_units; + public $multilangs; + + public $product_type; // type in line + public $product_ref; // ref in product table + public $product_label; // label in product table + public $product_desc; // desc in product table + public $fk_product_type; // type in product table + + public $qty; + public $duree; + public $remise_percent; + public $info_bits; + public $special_code; + + /** * Constructor diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 8085adf6283..e388159f978 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -64,10 +64,40 @@ abstract class CommonStickerGenerator public $code; // Code of format /** - * @var array format Array with informations + * @var int page_largeur + */ + public $page_largeur; + + /** + * @var int page_hauteur + */ + public $page_hauteur; + + /** + * @var array format */ public $format; + /** + * @var int marge_gauche + */ + public $marge_gauche; + + /** + * @var int marge_droite + */ + public $marge_droite; + + /** + * @var int marge_haute + */ + public $marge_haute; + + /** + * @var int marge_basse + */ + public $marge_basse; + // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore // protected // Nom du format de l'etiquette @@ -100,6 +130,8 @@ abstract class CommonStickerGenerator protected $_COUNTY = 1; protected $_First = 1; public $Tformat; + + // phpcs:enable /** * Constructor diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 37b8d580d1c..da3ba49095f 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -917,44 +917,46 @@ class dolReceiptPrinter extends Printer $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_array($resql); + if (empty($obj)) { + $error++; + $this->errors[] = 'PrinterDontExist'; + } + if (!$error) { + $parameter = (isset($obj['parameter']) ? $obj['parameter'] : ''); + try { + $type = $obj['fk_type']; + switch ($type) { + case 1: + $this->connector = new DummyPrintConnector(); + break; + case 2: + $this->connector = new FilePrintConnector($parameter); + break; + case 3: + $parameters = explode(':', $parameter); + $this->connector = new NetworkPrintConnector($parameters[0], $parameters[1]); + break; + case 4: // LPT1, smb://... + $this->connector = new WindowsPrintConnector(dol_sanitizePathName($parameter)); + break; + case 5: + $this->connector = new CupsPrintConnector($parameter); + break; + default: + $this->connector = 'CONNECTOR_UNKNOWN'; + break; + } + $this->printer = new Printer($this->connector, $this->profile); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + $error++; + } + } } else { $error++; $this->errors[] = $this->db->lasterror; } - if (empty($obj)) { - $error++; - $this->errors[] = 'PrinterDontExist'; - } - if (!$error) { - $parameter = $obj['parameter']; - try { - switch ($obj['fk_type']) { - case 1: - $this->connector = new DummyPrintConnector(); - break; - case 2: - $this->connector = new FilePrintConnector($parameter); - break; - case 3: - $parameters = explode(':', $parameter); - $this->connector = new NetworkPrintConnector($parameters[0], $parameters[1]); - break; - case 4: // LPT1, smb://... - $this->connector = new WindowsPrintConnector(dol_sanitizePathName($parameter)); - break; - case 5: - $this->connector = new CupsPrintConnector($parameter); - break; - default: - $this->connector = 'CONNECTOR_UNKNOWN'; - break; - } - $this->printer = new Printer($this->connector, $this->profile); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - $error++; - } - } + return $error; } } diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 517fc953830..b5b1619443b 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -56,6 +56,8 @@ class EmailSenderProfile extends CommonObject */ public $picto = 'emailsenderprofile'; + public $fk_user_creat; + const STATUS_DISABLED = 0; const STATUS_ENABLED = 1; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e96b042beae..bc404f98cbc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2755,7 +2755,6 @@ class Form $objp->price = $objp2->price; $objp->unitprice = $objp2->unitprice; $objp->remise_percent = $objp2->remise_percent; - $objp->remise = $objp2->remise; //$objp->tva_tx is not overwritten by $objp2 value //$objp->default_vat_code is not overwritten by $objp2 value @@ -10142,9 +10141,6 @@ class Form window.parent.jQuery(\'#idfordialog'.$dol_openinpopup.'\').dialog(\'close\'); });'; $retstring .= ''; - // TODO @LDR for the save button, in action "add", set parent var to return data and close the window - //$retstring .= 'setid '; - //$retstring .= 'setlabel'; } return $retstring; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 457d310492c..fac32e62e5e 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -86,23 +86,21 @@ class FormActions select_status(); $('#select' + htmlname).change(function() { + console.log('We change field select '+htmlname); select_status(); }); - // FIXME use another method for update combobox - //$('#val' + htmlname).change(function() { - //select_status(); - //}); }); function select_status() { var defaultvalue = $('#select' + htmlname).val(); + console.log('val='+defaultvalue); var percentage = $('input[name=percentage]'); var selected = '".(isset($selected) ? dol_escape_js($selected) : '')."'; var value = (selected>0?selected:(defaultvalue>=0?defaultvalue:'')); percentage.val(value); - if (defaultvalue == -1) { + if (defaultvalue == 'na' || defaultvalue == -1) { percentage.prop('disabled', true); $('.hideifna').hide(); } @@ -131,7 +129,7 @@ class FormActions } print '