Merge branch 'Dolibarr:develop' into extrafields-support-selectForForms

This commit is contained in:
Jakub Stříbrný 2023-07-13 16:38:25 +02:00 committed by GitHub
commit 0cff3efddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 502 additions and 206 deletions

View file

@ -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'

View file

@ -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

View file

@ -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",

View file

@ -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 = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("BOMLinesSetup"), $linkback, 'title_setup');
print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup');
$head = bomAdminPrepareHead();

View file

@ -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

View file

@ -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 '</tr>'."\n";
$totalarray = array();
$totalarray['nbfield'] = 0;
// Loop on record
// --------------------------------------------------------------------
$i = 0;
@ -475,7 +483,7 @@ if ($num == 0) {
$colspan++;
}
}
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
print '<tr><td colspan="'.$savnbfield.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
}
$db->free($resql);

View file

@ -1551,14 +1551,11 @@ if ($action == 'create') {
print '<div class="reminderparameters" style="display: none;">';
//print '<hr>';
//print load_fiche_titre($langs->trans("AddReminder"), '', '');
print '<table class="border centpercent">';
//Reminder
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
print '<input class="width50" type="number" name="offsetvalue" value="'.(GETPOSTISSET('offsetvalue') ? GETPOST('offsetvalue', 'int') : '15').'"> ';
print '<input class="width50" type="number" name="offsetvalue" value="'.(GETPOSTISSET('offsetvalue') ? GETPOST('offsetvalue', 'int') : getDolGlobalInt('AGENDA_REMINDER_DEFAULT_OFFSET', 30)).'"> ';
print $form->selectTypeDuration('offsetunit', 'i', array('y', 'm'));
print '</td></tr>';
@ -1987,14 +1984,14 @@ if ($id > 0) {
// update task list
print "\n".'<script type="text/javascript" >';
print '$(document).ready(function () {
$("#projectid").change(function () {
$("#projectid").change(function () {
var url = "'.$url.'&projectid="+$("#projectid").val();
$.get(url, function(data) {
console.log($( data ).find("#fk_element").html());
if (data) $("#fk_element").html( $( data ).find("#taskid").html() ).select2();
})
});
})';
})';
print '</script>'."\n";
$formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $object->fk_element, 'fk_element', 24, 0, 0, 1, 0, 0, 'maxwidth500', $object->fk_project);
@ -2049,12 +2046,12 @@ if ($id > 0) {
} else {
$checked = '';
$actionCommReminder = new ActionCommReminder($db);
$actionCommReminder->offsetvalue = 10;
$actionCommReminder->offsetvalue = getDolGlobalInt('AGENDA_REMINDER_DEFAULT_OFFSET', 30);
$actionCommReminder->offsetunit = 'i';
$actionCommReminder->typeremind = 'email';
}
print '<label for="addreminder">'.$langs->trans("AddReminder").'</label> <input type="checkbox" id="addreminder" name="addreminder" '.$checked.'><br>';
print '<label for="addreminder">'.img_picto('', 'bell', 'class="pictofixedwidth"').$langs->trans("AddReminder").'</label> <input type="checkbox" id="addreminder" name="addreminder" '.$checked.'><br>';
print '<div class="reminderparameters" '.(empty($checked) ? 'style="display: none;"' : '').'>';
@ -2079,9 +2076,11 @@ if ($id > 0) {
}
// Mail Model
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1);
print '</td></tr>';
if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) {
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1);
print '</td></tr>';
}
print '</table>';

View file

@ -468,7 +468,7 @@ class Commande extends CommonOrder
* @param User $user User making status change
* @param int $idwarehouse Id of warehouse to use for stock decrease
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <=0 if OK, 0=Nothing done, >0 if KO
* @return int <0 if KO, 0=Nothing done, >0 if OK
*/
public function valid($user, $idwarehouse = 0, $notrigger = 0)
{

View file

@ -63,7 +63,7 @@ $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'),
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
$label = GETPOST('label', 'alpha');
$actioncode = GETPOST('actioncode');
$fk_user = GETPOST('userid', 'int');
$fk_user = GETPOST('userid', 'int') > 0 ? GETPOST('userid', 'int') : 0;
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('taxcard', 'globalcard'));
@ -511,7 +511,7 @@ if ($id > 0) {
// Employee
if ($action != 'editfk_user') {
if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) {
if ($object->getSommePaiement() > 0 && $object->fk_user > 0) {
$userstatic = new User($db);
$result = $userstatic->fetch($object->fk_user);
if ($result > 0) {
@ -519,7 +519,7 @@ if ($id > 0) {
}
} else {
$morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1);
if (!empty($object->fk_user)) {
if ($object->fk_user > 0) {
$userstatic = new User($db);
$result = $userstatic->fetch($object->fk_user);
if ($result > 0) {

View file

@ -10,6 +10,7 @@
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
*
* 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
@ -993,7 +994,7 @@ if (empty($reshook)) {
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to build doc
$upload_dir = $conf->contrat->multidir_output[$object->entity];
$upload_dir = $conf->contrat->multidir_output[!empty($object->entity)?$object->entity:$conf->entity];
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
// Actions to send emails
@ -1086,6 +1087,7 @@ if ($result > 0) {
// Create
if ($action == 'create') {
$objectsrc = null;
print load_fiche_titre($langs->trans('AddContract'), '', 'contract');
$soc = new Societe($db);

View file

@ -118,8 +118,8 @@ if (empty($conf->bookmark->enabled)) {
// Url to list bookmark
$bookmarkList .= '<br>';
$bookmarkList .= '<a class="top-menu-dropdown-link" title="'.$langs->trans('Bookmarks').'" href="'.DOL_URL_ROOT.'/bookmarks/list.php" >';
$bookmarkList .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('Bookmarks').'</a>';
$bookmarkList .= '<a class="top-menu-dropdown-link" title="'.$langs->trans('EditBookmarks').'" href="'.DOL_URL_ROOT.'/bookmarks/list.php" >';
$bookmarkList .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('EditBookmarks').'</a>';
$bookmarkList .= '<br>';
$bookmarkList .= '<br>';

View file

@ -99,7 +99,10 @@ class box_factures extends ModeleBoxes
$sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.logo, s.email, s.entity";
$sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
$sql .= ", SUM(pf.amount) as am";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture,";
$sql .= " ".MAIN_DB_PREFIX."societe as s";
if (empty($user->rights->societe->client->voir) && !$user->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
@ -111,6 +114,8 @@ class box_factures extends ModeleBoxes
if ($user->socid) {
$sql .= " AND s.rowid = ".((int) $user->socid);
}
$sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,";
$sql .= " f.rowid, f.ref, f.type, f.total_ht, f.total_tva, f.total_ttc, f.datef, f.paye, f.fk_statut, f.datec, f.tms, f.date_lim_reglement";
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) {
$sql .= " ORDER BY f.datef DESC, f.ref DESC ";
} else {
@ -128,8 +133,8 @@ class box_factures extends ModeleBoxes
while ($line < $num) {
$objp = $this->db->fetch_object($result);
$datelimite = $this->db->jdate($objp->datelimite);
$date = $this->db->jdate($objp->date);
$datem = $this->db->jdate($objp->tms);
$facturestatic->id = $objp->facid;
@ -142,7 +147,9 @@ class box_factures extends ModeleBoxes
$facturestatic->status = $objp->status;
$facturestatic->date = $this->db->jdate($objp->date);
$facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite);
$facturestatic->alreadypaid = $objp->paye;
$facturestatic->paye = $objp->paye;
$facturestatic->alreadypaid = $objp->am;
$societestatic->id = $objp->socid;
$societestatic->name = $objp->name;
@ -191,7 +198,7 @@ class box_factures extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->paye),
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->am),
);
$line++;

View file

@ -633,7 +633,7 @@ abstract class CommonObject
public $alreadypaid;
protected $labelStatus;
public $labelStatus;
protected $labelStatusShort;
/**

View file

@ -4270,6 +4270,7 @@ class Form
// Set default value if not already set by caller
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID)) {
dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TERM_ID", LOG_NOTICE);
$selected = $conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID;
}
@ -4374,6 +4375,7 @@ class Form
// Set default value if not already set by caller
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) {
dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TYPE_ID", LOG_NOTICE);
$selected = $conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID;
}

View file

@ -1377,6 +1377,7 @@ class FormTicket
// If constant set, allow to send private messages as email
if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) {
print 'jQuery("#send_msg_email").click(function() {
console.log("Click send_msg_email");
if(jQuery(this).is(":checked")) {
if (jQuery("#private_message").is(":checked")) {
jQuery("#private_message").prop("checked", false).trigger("change");
@ -1389,6 +1390,7 @@ class FormTicket
});
jQuery("#private_message").click(function() {
console.log("Click private_message");
if (jQuery(this).is(":checked")) {
if (jQuery("#send_msg_email").is(":checked")) {
jQuery("#send_msg_email").prop("checked", false).trigger("change");
@ -1444,7 +1446,12 @@ class FormTicket
$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : (getDolGlobalInt('TICKETS_MESSAGE_FORCE_MAIL')?'checked':''));
print '<input type="checkbox" name="send_email" value="1" id="send_msg_email" '.$checkbox_selected.'/> ';
print '<label for="send_msg_email">'.$langs->trans('SendMessageByEmail').'</label>';
$texttooltip = $langs->trans("TicketMessageSendEmailHelp", '{s1}');
$texttooltip = $langs->trans("TicketMessageSendEmailHelp");
if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) {
$texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2b");
} else {
$texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2a", '{s1}');
}
$texttooltip = str_replace('{s1}', $langs->trans('MarkMessageAsPrivate'), $texttooltip);
print ' '.$form->textwithpicto('', $texttooltip, 1, 'help');
print '</td></tr>';

View file

@ -1906,6 +1906,15 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= '<table class="noborder centpercent">';
$out .= '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<th class="liste_titre width50 middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</th>';
}
if ($donetodo) {
$out .= '<td class="liste_titre"></td>';
}
@ -1923,13 +1932,19 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= '<td class="liste_titre"></td>';
$out .= '<td class="liste_titre"></td>';
// Action column
$out .= '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</td>';
}
$out .= '</tr>';
$out .= '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
}
if ($donetodo) {
$tmp = '';
if (get_class($filterobj) == 'Societe') {
@ -1952,7 +1967,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= getTitleFieldOfList("RelatedObjects", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
$out .= getTitleFieldOfList("ActionOnContact", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'tdoverflowmax125 ', 0, '', 0);
$out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center ');
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
}
$out .= '</tr>';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
@ -1967,6 +1985,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td></td>';
}
// Done or todo
if ($donetodo) {
$out .= '<td class="nowrap">';
@ -2127,8 +2150,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
// Status
$out .= '<td class="nowrap center">'.$actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']).'</td>';
// Actions
$out .= '<td></td>';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td></td>';
}
$out .= "</tr>\n";
$i++;

View file

@ -12516,6 +12516,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
$out .= '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<th class="liste_titre width50 middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</th>';
}
$out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n";
$out .= '<th class="liste_titre"><strong class="hideonsmartphone">'.$langs->trans("Search").' : </strong></th>';
@ -12531,10 +12539,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
$out .= '<input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'" placeholder="'.$langs->trans("Label").'">';
$out .= '</th>';
$out .= '<th class="liste_titre width50 middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</th>';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<th class="liste_titre width50 middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</th>';
}
$out .= '</tr>';
@ -12615,7 +12627,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
$out .= '</span>';
// Date
$out .= '<span class="time"><i class="fa fa-clock-o"></i> ';
$out .= '<span class="time"><i class="fa fa-clock-o valignmiddle"></i> <span class="valignmiddle">';
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel');
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) {
$tmpa = dol_getdate($histo[$key]['datestart'], true);
@ -12642,13 +12654,13 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
if ($late) {
$out .= img_warning($langs->trans("Late")).' ';
}
$out .= "</span>\n";
$out .= "</span></span>\n";
// Ref
$out .= '<h3 class="timeline-header">';
// Author of event
$out .= '<div class="messaging-author inline-block">';
$out .= '<div class="messaging-author inline-block tdoverflowmax150 valignmiddle marginrightonly">';
if ($histo[$key]['userid'] > 0) {
if (!isset($userGetNomUrlCache[$histo[$key]['userid']])) { // is in cache ?
$userstatic->fetch($histo[$key]['userid']);

View file

@ -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.

View file

@ -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);

View file

@ -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');

View file

@ -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',

View file

@ -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));

View file

@ -2,3 +2,6 @@
!.gitignore
!README.md
!index.html
/advancedhrm
/ship2bill

View file

@ -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 = '';

View file

@ -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),
);
/**

View file

@ -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 '<tr><td class="left">'.$langs->trans("Status").'</td><td class="left">';
$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 '</td></tr>';

View file

@ -659,7 +659,7 @@ if ($object->id > 0) {
print '<td colspan="3">';
print '<table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastSupplierProposals", ($num < $MAXLIST ? "" : $MAXLIST)).'</td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllPriceRequests").'</span><span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
// print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
print '</tr></table>';
print '</td></tr>';
}

View file

@ -200,6 +200,7 @@ $arrayfields = array(
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>501),
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502),
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
'f.nb_docs'=>array('label'=>"Documents", 'checked'=>1, 'position'=>510),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -1157,6 +1158,11 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) {
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
print '</td>';
}
if (!empty($arrayfields['f.nb_docs']['checked'])) {
// Nb of attached documents
print '<td class="liste_titre" align="center">';
print '</td>';
}
if (!empty($arrayfields['u.login']['checked'])) {
// Author
print '<td class="liste_titre" align="center">';
@ -1341,6 +1347,9 @@ if (!empty($arrayfields['f.total_ttc']['checked'])) {
print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, '', $sortfield, $sortorder, 'right ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['f.nb_docs']['checked'])) {
print_liste_field_titre($arrayfields['f.nb_docs']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
}
if (!empty($arrayfields['u.login']['checked'])) {
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
$totalarray['nbfield']++;
@ -1770,6 +1779,17 @@ while ($i < $imaxinloop) {
$totalarray['val']['f.total_ttc'] += $obj->total_ttc;
}
// Number of attached documents
if (!empty($arrayfields['f.nb_docs']['checked'])) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facturestatic->id, 2, 0, 0, $facturestatic, 'invoice_supplier').$facturestatic->ref;
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks = Link::count($db, $facturestatic->element, $facturestatic->id);
$nbTotal = $nbFiles + $nbLinks;
echo '<td class="center">'.(empty($nbTotal)? '':$nbTotal).'</td>';
}
// Author
if (!empty($arrayfields['u.login']['checked'])) {
print '<td class="tdoverflowmax150">';

View file

@ -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,'ΤΕΛΗ');

View file

@ -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;

View file

@ -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;

View file

@ -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),

View file

@ -1,5 +1,6 @@
-- SQL definition for module ticket
-- Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
-- Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
--
-- 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,

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Anthony Berton <anthony.berton@bb2a.fr>
*
@ -519,7 +519,7 @@ if (empty($reshook)) {
if (!empty($moreforfilter)) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
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 '</div>';

View file

@ -365,10 +365,10 @@ GenericMaskCodes=You may enter any numbering mask. In this mask, the following t
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br>
GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br>
GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br>
GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br>
GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br>
GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br>
GenericMaskCodes5=<b>ABC{yy}{mm}-{000000}</b> will give <b>ABC0701-000099</b><br><b>{0000+100@1}-ZZZ/{dd}/XXX</b> will give <b>0199-ZZZ/31/XXX</b><br><b>IN{yy}{mm}-{0000}-{t}</b> will give <b>IN0701-0099-A</b> if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI'
GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2023-01-31:</u><br>
GenericMaskCodes4b=<u>Example on third party created on 2023-01-31:</u><br>
GenericMaskCodes4c=<u>Example on product created on 2023-01-31:</u><br>
GenericMaskCodes5=<b>ABC{yy}{mm}-{000000}</b> will give <b>ABC2301-000099</b><br><b>{0000+100@1}-ZZZ/{dd}/XXX</b> will give <b>0199-ZZZ/31/XXX</b><br><b>IN{yy}{mm}-{0000}-{t}</b> will give <b>IN2301-0099-A</b> 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 <b>%s</b> on port <b>%s</b>
ServerNotAvailableOnIPOrPort=Server is not available at address <b>%s</b> on port <b>%s</b>
@ -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:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir
FollowingSubstitutionKeysCanBeUsed=<br>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 <b>%s</b> 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 <b>on user's browser</b> (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 <b>by emails</b> (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 <b>on user's browser</b> (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 <b>by emails</b> (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<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> 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<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> 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.<br>Example: "minwiwdth100 maxwidth500 widthcentpercentminusx"
HelpCssOnViewDesc=The Css used when viewing the field.
HelpCssOnListDesc=The Css used when field is inside a list table.<br>Example: "tdoverflowmax200"
CssOnEdit=CSS on edit pages
CssOnView=CSS on view pages
CssOnList=CSS on lists
HelpCssOnEditDesc=The CSS used when editing the field.<br>Example: "minwiwdth100 maxwidth500 widthcentpercentminusx"
HelpCssOnViewDesc=The CSS used when viewing the field.
HelpCssOnListDesc=The CSS used when field is inside a list table.<br>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 "<b>%s</b>" should be enabled into module <b>%s</b>
OptionXIsCorrectlyEnabledInModuleY=Option "<b>%s</b>" is enabled into module <b>%s</b>
AtBottomOfPage=At bottom of page
AtBottomOfPage=At bottom of page

View file

@ -304,7 +304,7 @@ ErrorValueForTooLow=Value for <b>%s</b> is too low
ErrorValueCantBeNull=Value for <b>%s</b> 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 <b>%s</b> for object <b>%s</b> already exists
ErrorFieldExist=The value for <b>%s</b> already exist
ErrorEqualModule=Module invalid in <b>%s</b>

View file

@ -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

View file

@ -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
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

View file

@ -122,3 +122,4 @@ BOMServicesList=BOM's services
Manufacturing=Manufacturing
Disassemble=Disassemble
ProducedBy=Produced by
QtyTot=Qty Total

View file

@ -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

View file

@ -304,7 +304,7 @@ ErrorValueForTooLow=La valeur pour <b>%s</b> est trop faible
ErrorValueCantBeNull=La valeur pour <b>%s</b> 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 <b>%s</b> pour l'objet <b>%s</b> existe déjà.
ErrorFieldExist=La valeur pour <b>%s</b> existe déjà
ErrorEqualModule=Module invalide dans <b>%s</b>.

View file

@ -122,3 +122,5 @@ BOMServicesList=Les services de BOM
Manufacturing=Fabrication
Disassemble=Déassemblage
ProducedBy=Produit par
QtyTot=Qty Total
InProgress=En cours

View file

@ -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;
}*/

View file

@ -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;
}

View file

@ -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 '</div>';
print '</td></tr>';

View file

@ -991,10 +991,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<td class="nowrap center">';
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 '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '<input id="cb'.$objp->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objp->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
if (!$i) {

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}
/**

View file

@ -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 '&nbsp; <div id="expression_editor" class="button">'.$langs->trans("PriceExpressionEditor").'</div>';
print '&nbsp; <div id="expression_editor" class="button smallpaddingimp">'.$langs->trans("PriceExpressionEditor").'</div>';
print '</td></tr>';
// This code hides the numeric price input if is not selected, loads the editor page if editor button is pressed
print '<script type="text/javascript">

View file

@ -71,7 +71,7 @@ class Warehouses extends DolibarrApi
throw new RestException(404, 'warehouse not found');
}
if (!DolibarrApi::_checkAccessToResource('warehouse', $this->warehouse->id)) {
if (!DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id, 'entrepot')) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}

View file

@ -85,7 +85,7 @@ $search_user = trim(GETPOST("search_user"));
$search_batch = trim(GETPOST("search_batch"));
$search_qty = trim(GETPOST("search_qty"));
$search_type_mouvement = GETPOST('search_type_mouvement', 'int');
$search_fk_projet=GETPOST("search_fk_projet", 'int');
$search_fk_project=GETPOST("search_fk_project", 'int');
$type = GETPOST("type", "int");
@ -226,7 +226,7 @@ if (empty($reshook)) {
$search_user = "";
$search_batch = "";
$search_qty = '';
$search_fk_projet=0;
$search_fk_project = "";
$search_all = "";
$toselect = array();
$search_array_options = array();
@ -690,8 +690,8 @@ if (!empty($search_batch)) {
if (!empty($product_id) && $product_id != '-1') {
$sql .= natural_search('p.rowid', $product_id);
}
if (!empty($search_fk_projet) && $search_fk_projet != '-1') {
$sql .= natural_search('m.fk_projet', $search_fk_projet);
if (!empty($search_fk_project) && $search_fk_project != '-1') {
$sql .= natural_search('m.fk_projet', $search_fk_project);
}
if ($search_qty != '') {
$sql .= natural_search('m.value', $search_qty, 1);
@ -1008,6 +1008,9 @@ if ($search_user) {
if ($idproduct > 0) {
$param .= '&idproduct='.urlencode($idproduct);
}
if ($search_fk_project != '' && $search_fk_project != '-1') {
$param .= '&search_fk_project='.urlencode($search_fk_project);
}
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// Add $param from hooks
@ -1181,7 +1184,7 @@ if (!empty($arrayfields['origin']['checked'])) {
if (!empty($arrayfields['m.fk_projet']['checked'])) {
// fk_project
print '<td class="liste_titre" align="left">';
print '&nbsp; ';
print $object->showInputField($object->fields['fk_project'], 'fk_project', $search_fk_project, '', '', 'search_', 'maxwidth125', 1);
print '</td>';
}
if (!empty($arrayfields['m.type_mouvement']['checked'])) {

View file

@ -191,7 +191,7 @@ if (empty($reshook)) {
}
// Create with status validated immediatly
if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT)) {
if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT) && !$error) {
$status = Project::STATUS_VALIDATED;
}

View file

@ -853,13 +853,8 @@ foreach ($listofreferent as $key => $value) {
} elseif ($tablename == 'stock_mouvement') {
$total_ht_by_line = $element->price * abs($element->qty);
} elseif ($tablename == 'projet_task') {
if ($idofelementuser) {
$tmp = $element->getSumOfAmount($elementuser, $dates, $datee);
$total_ht_by_line = price2num($tmp['amount'], 'MT');
} else {
$tmp = $element->getSumOfAmount('', $dates, $datee);
$total_ht_by_line = price2num($tmp['amount'], 'MT');
}
$tmp = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee);
$total_ht_by_line = price2num($tmp['amount'], 'MT');
} elseif ($key == 'loan') {
if ((empty($dates) && empty($datee)) || (intval($dates) <= $element->datestart && intval($datee) >= $element->dateend)) {
// Get total loan
@ -1344,7 +1339,7 @@ foreach ($listofreferent as $key => $value) {
print " - ".dol_print_date($element->datef, 'dayhour');
}
} elseif (in_array($tablename, array('projet_task'))) {
$tmpprojtime = $element->getSumOfAmount($elementuser, $dates, $datee); // $element is a task. $elementuser may be empty
$tmpprojtime = $element->getSumOfAmount($idofelementuser ? $elementuser : '', $dates, $datee); // $element is a task. $elementuser may be empty
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$idofelement.'&withproject=1">';
print convertSecondToTime($tmpprojtime['nbseconds'], 'allhourmin');
print '</a>';

View file

@ -1018,6 +1018,9 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
//print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
if (!empty($place)) {
print '<input type="hidden" name="place" value="'.$place.'">';
}
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
if (empty($arrayfields['customerorsupplier']['checked'])) {
@ -1562,7 +1565,7 @@ while ($i < $imaxinloop) {
$companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
$companystatic->fk_prospectlevel = $obj->fk_prospectlevel;
$companystatic->parent = $obj->fk_parent;
$companystatic->fk_parent = $obj->fk_parent;
$companystatic->entity = $obj->entity;
}

View file

@ -460,7 +460,7 @@ if (empty($reshook)) {
}
if (($action == "addline" || $action == "freezone") && $placeid == 0) {
$invoice->socid = getDolGlobalString("$constforcompanyid");
$invoice->socid = getDolGlobalString($constforcompanyid);
$invoice->date = dol_now();
$invoice->module_source = 'takepos';
$invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
@ -537,7 +537,7 @@ if (empty($reshook)) {
$invoice->fetch_thirdparty();
$array_options = array();
$line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'locatax1_tx' => $localtax1_tx, 'locatax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options);
$line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'localtax1_tx' => $localtax1_tx, 'localtax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options);
/* setup of margin calculation */
if (isset($conf->global->MARGIN_TYPE)) {

View file

@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
*
* 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
@ -233,6 +233,7 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) {
}
$vat_groups[$line->tva_tx] += $line->total_tva;
}
// Loop on each VAT group
foreach ($vat_groups as $key => $val) {
?>
<tr>
@ -251,6 +252,23 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) {
echo $langs->trans("TotalVAT").'</th><td class="right">'.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n";
} ?></td>
</tr>
<?php }
// Now show local taxes if company uses them
if ($mysoc->useLocalTax(1) || price2num($object->total_localtax1, 'MU')) { ?>
<tr>
<th class="right"><?php if ($gift != 1) {
echo ''.$langs->trans("TotalLT1").'</th><td class="right">'.price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency)."\n";
} ?></td>
</tr>
<?php } ?>
<?php if ($mysoc->useLocalTax(2) || price2num($object->total_localtax2, 'MU')) { ?>
<tr>
<th class="right"><?php if ($gift != 1) {
echo ''.$langs->trans("TotalLT2").'</th><td class="right">'.price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency)."\n";
} ?></td>
</tr>
<?php } ?>
<tr>
<th class="right"><?php if ($gift != 1) {

View file

@ -1986,8 +1986,8 @@ td.showDragHandle {
#id-left {
padding-top: 20px;
padding-bottom: 5px;
<?php if (!empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN) && !empty($conf->global->MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)) { ?>
padding-top: 20px;
<?php if (getDolGlobalString('MAIN_USE_TOP_MENU_SEARCH_DROPDOWN')) { ?>
padding-top: 18px;
<?php } ?>
}
#id-right { /* This must stay id-right and not be replaced with echo $right */

View file

@ -1131,7 +1131,7 @@ if ($action == 'create' || $action == 'presend') {
$foundinter = 0;
if ($num) {
foreach ($object->linkedObjects as $objecttype => $objects) {
if ($objecttype = "fichinter") {
if ($objecttype == "fichinter") {
foreach ($objects as $fichinter) {
$foundinter++;
$timing += $fichinter->duration;

View file

@ -55,10 +55,13 @@ $mode = GETPOST('mode', 'alpha');
$id = GETPOST('id', 'int');
$msg_id = GETPOST('msg_id', 'int');
$socid = GETPOST('socid', 'int');
$contractid = GETPOST('contractid', 'int');
$projectid = GETPOST('projectid', 'int');
$project_ref = GETPOST('project_ref', 'alpha');
$search_societe = GETPOST('search_societe', 'alpha');
$search_fk_project = GETPOST('search_fk_project', 'int') ?GETPOST('search_fk_project', 'int') : GETPOST('projectid', 'int');
$search_fk_contract = GETPOST('search_fk_contract', 'int') ?GETPOST('search_fk_contract', 'int') : GETPOST('contractid', 'int');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_dateread_start = dol_mktime(0, 0, 0, GETPOST('search_dateread_startmonth', 'int'), GETPOST('search_dateread_startday', 'int'), GETPOST('search_dateread_startyear', 'int'));
@ -427,6 +430,9 @@ if ($search_societe) {
if ($search_fk_project > 0) {
$sql .= natural_search('fk_project', $search_fk_project, 2);
}
if ($search_fk_contracct > 0) {
$sql .= natural_search('fk_contract', $search_fk_contract, 2);
}
if ($search_date_start) {
$sql .= " AND t.datec >= '".$db->idate($search_date_start)."'";
}
@ -918,7 +924,7 @@ foreach ($object->fields as $key => $val) {
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
} elseif (strpos($val['type'], 'integer:') === 0) {
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1);
print $object->showInputField($val, $key, !empty($search[$key])?$search[$key]:"", '', '', 'search_', 'maxwidth150', 1);
} elseif (!preg_match('/^(date|timestamp)/', $val['type'])) {
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]).'">';
}

View file

@ -265,7 +265,6 @@ if (!empty($object->id)) {
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep=now&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus);
print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
// List of all actions

View file

@ -56,6 +56,9 @@ $bankid = GETPOST('bankid', 'int');
$action = GETPOST("action", 'alpha');
$cancel = GETPOST('cancel', 'alpha');
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('usercardBank', 'globalcard'));
// Security check
$socid = 0;
if ($user->socid > 0) {
@ -876,8 +879,14 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoBANRecord").'</span></td></tr>';
}
print '</table>';
print '</div>';
// Add hook in fields
$parameters = array('colspan' => ' colspan="2"');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
}
// Edit

View file

@ -688,7 +688,6 @@ class User extends CommonObject
*/
public function hasRight($module, $permlevel1, $permlevel2 = '')
{
global $conf;
// For compatibility with bad naming permissions on module
$moduletomoduletouse = array(
'compta' => 'comptabilite',

View file

@ -70,15 +70,15 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
//if ($user->socid > 0) accessforbidden();
//if ($user->socid > 0) $socid = $user->socid;
//$result = restrictedArea($user, 'website', $id);
if (empty($user->rights->websiteaccount->read)) {
if (empty($user->hasRight('website', 'read'))) {
accessforbidden('NotAllowed');
}
// Permissions
$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php
$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->websiteaccount->delete;
$permissionnote = $user->hasRight('website', 'write'); // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->hasRight('website', 'write'); // Used by the include of actions_dellink.inc.php
$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->hasRight('website', 'delete');
/*
@ -94,8 +94,8 @@ if ($reshook < 0) {
if (empty($reshook)) {
$error = 0;
$permissiontoadd = $user->rights->website->write;
$permissiontodelete = $user->rights->website->delete;
$permissiontoadd = $user->hasRight('website', 'write');
$permissiontodelete = $user->hasRight('website', 'delete');
$backurlforlist = dol_buildpath('/website/websiteaccount_list.php', 1);
// Actions cancel, add, update or delete
@ -221,8 +221,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtmlref = '<div class="refidno">';
/*
// Ref bis
$morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->website->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->website->creer, 'string', '', null, null, '', 1);
$morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
// Project
@ -230,7 +230,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->website->creer)
if ($user->hasRight('website', 'write'))
{
if ($action != 'classify')
{
@ -305,7 +305,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'."\n";
}
if ($user->rights->website->write) {
if ($user->hasRight('website', 'write')) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a></div>'."\n";
}