Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9a1ec8ff04
37 changed files with 328 additions and 252 deletions
13
.github/CONTRIBUTING.md
vendored
13
.github/CONTRIBUTING.md
vendored
|
|
@ -36,12 +36,13 @@ Definition:
|
|||
|
||||
As the Developer:
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
5. Commit and push your changes.
|
||||
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
1. Check you agree with the terms of the [DCO - Developer's Certificate of Origin](https://github.com/Dolibarr/dolibarr/DCO)
|
||||
2. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
3. Clone your fork.
|
||||
4. Choose a branch(See the [Branches](#branches) section below).
|
||||
5. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
6. Commit and push your changes.
|
||||
7. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
As the PR Maintainer:
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Security report are valid only on current stable version (see https://dolibarr.o
|
|||
|
||||
To report a vulnerability, for a private report, you can:
|
||||
|
||||
- Send your report on Vulnerability Disclosure Program (VDP): Link will be upadeted soon (recommended for everybody)
|
||||
- Send your report on Vulnerability Disclosure Program (VDP): Link will be updated soon (recommended for everybody)
|
||||
<!--
|
||||
- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ if ($action == 'edit') {
|
|||
|
||||
// SuperAdministrator access only
|
||||
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE);
|
||||
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE'));
|
||||
} else {
|
||||
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')];
|
||||
if (empty($text)) {
|
||||
|
|
|
|||
|
|
@ -80,6 +80,15 @@ $statuslist = array(
|
|||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if (GETPOSTISSET('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION')) { // only for no js case
|
||||
$param_disable_email = GETPOST('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION', $param_disable_email, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
setEventMessages($db->lasterror(), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'updateMask') {
|
||||
$maskconstticket = GETPOST('maskconstticket', 'aZ09');
|
||||
$maskticket = GETPOST('maskticket', 'alpha');
|
||||
|
|
@ -112,17 +121,9 @@ if ($action == 'updateMask') {
|
|||
} elseif (preg_match('/set_(.*)/', $action, $reg)) {
|
||||
$code = $reg[1];
|
||||
$value = GETPOSTISSET($code) ? GETPOSTINT($code) : 1;
|
||||
if ($code == 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
$res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
$res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
} elseif (preg_match('/del_(.*)/', $action, $reg)) {
|
||||
$code = $reg[1];
|
||||
|
|
@ -240,15 +241,6 @@ if ($action == 'updateMask') {
|
|||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
// For compatibility when javascript is not enabled
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 && empty($conf->use_javascript_ajax)) {
|
||||
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -605,21 +597,6 @@ print $formcategory->textwithpicto('', $langs->trans("TicketAutoChangeStatusOnAn
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Check "Notify thirdparty" on ticket creation
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAutoCheckNotifyThirdParty").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION", $arrval, getDolGlobalString('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAutoCheckNotifyThirdPartyHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TicketsDelayBeforeFirstAnswer")."</td>";
|
||||
print '<td class="left">
|
||||
|
|
@ -646,13 +623,14 @@ print $formcategory->buttonsSaveCancel("Save", '', array(), 0, 'reposition');
|
|||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Notification
|
||||
* Emails
|
||||
*/
|
||||
|
||||
// Admin var of module
|
||||
print load_fiche_titre($langs->trans("Notification"), '', '');
|
||||
print load_fiche_titre($langs->trans("Emails"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
|
|
@ -662,7 +640,8 @@ print '<input type="hidden" name="action" value="setvar">';
|
|||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("Email").'</td>';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
@ -687,28 +666,26 @@ print '</tr>';
|
|||
// Email for notification of TICKET_CREATE
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
|
||||
print '<td class="left">';
|
||||
print '<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : '').'"></td>';
|
||||
print '<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO').'"></td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Also send to TICKET_NOTIFICATION_EMAIL_TO for responses (not only creation)
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsEmailAlsoSendToMainAddress").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Check "Notify thirdparty" on ticket creation
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAutoCheckNotifyThirdParty").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION", $arrval, getDolGlobalString('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAutoCheckNotifyThirdPartyHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message header
|
||||
$mail_intro = getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO', '');
|
||||
|
|
|
|||
|
|
@ -84,15 +84,6 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') {
|
|||
}
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('TICKET_DISABLE_CUSTOMER_MAILS')) { // only for no js case
|
||||
$param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('TICKET_SHOW_COMPANY_LOGO')) { // only for no js case
|
||||
$param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
|
||||
|
|
@ -408,23 +399,6 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Also send to main email address
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsEmailAlsoSendToMainAddress").'</td>';
|
||||
print '<td class="left">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, getDolGlobalInt('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center width75">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp", $langs->transnoentitiesnoconv("TicketEmailNotificationTo").' ('.$langs->transnoentitiesnoconv("Creation").')', $langs->trans("Settings")), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></td>';
|
||||
print '</tr>';
|
||||
|
|
@ -516,20 +490,6 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Activate email creation to user
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketsDisableCustomerEmail"), $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_DISABLE_CUSTOMER_MAILS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_DISABLE_CUSTOMER_MAILS", $arrval, getDolGlobalInt('TICKET_DISABLE_CUSTOMER_MAILS'));
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Text of email after creatio of a ticket
|
||||
$mail_mesg_new = getDolGlobalString("TICKET_MESSAGE_MAIL_NEW", $langs->trans('TicketNewEmailBody'));
|
||||
print '<tr class="oddeven"><td>';
|
||||
|
|
@ -564,6 +524,22 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Also send to main email address
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsEmailAlsoSendToMainAddress");
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp", $langs->transnoentitiesnoconv("TicketEmailNotificationTo").' ('.$langs->transnoentitiesnoconv("Creation").')', $langs->trans("Settings")), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, getDolGlobalInt('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS'));
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -2139,8 +2139,8 @@ if ($id > 0) {
|
|||
'type' => 'user',
|
||||
//'transparency'=>$object->userassigned[$user->id]['transparency'],
|
||||
'transparency' => $object->transparency, // Force transparency on ownerfrom event
|
||||
'answer_status' => $object->userassigned[$object->userownerid]['answer_status'],
|
||||
'mandatory' => $object->userassigned[$object->userownerid]['mandatory']
|
||||
'answer_status' => (isset($object->userassigned[$object->userownerid]['answer_status']) ? $object->userassigned[$object->userownerid]['answer_status']: null),
|
||||
'mandatory' => (isset($object->userassigned[$object->userownerid]['mandatory']) ? $object->userassigned[$object->userownerid]['mandatory']:null)
|
||||
);
|
||||
}
|
||||
if (!empty($object->userassigned)) { // Now concat assigned users
|
||||
|
|
|
|||
|
|
@ -2715,83 +2715,86 @@ class ActionComm extends CommonObject
|
|||
// Load event
|
||||
$res = $this->fetch($actionCommReminder->fk_actioncomm);
|
||||
if ($res > 0) {
|
||||
$res = $this->fetch_thirdparty();
|
||||
}
|
||||
if ($res > 0) {
|
||||
// PREPARE EMAIL
|
||||
$errormesg = '';
|
||||
$res2 = $this->fetch_thirdparty();
|
||||
if ($res2 >= 0) {
|
||||
// PREPARE EMAIL
|
||||
$errormesg = '';
|
||||
|
||||
// Make substitution in email content
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $this);
|
||||
// Make substitution in email content
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $this);
|
||||
|
||||
complete_substitutions_array($substitutionarray, $langs, $this);
|
||||
complete_substitutions_array($substitutionarray, $langs, $this);
|
||||
|
||||
// Content
|
||||
$sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray);
|
||||
// Content
|
||||
$sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray);
|
||||
|
||||
//Topic
|
||||
$sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->transnoentities('EventReminder'));
|
||||
//Topic
|
||||
$sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->transnoentities('EventReminder'));
|
||||
|
||||
// Recipient
|
||||
$recipient = new User($this->db);
|
||||
$res = $recipient->fetch($actionCommReminder->fk_user);
|
||||
if ($res > 0) {
|
||||
if (!empty($recipient->email)) {
|
||||
$to = $recipient->email;
|
||||
// Recipient
|
||||
$recipient = new User($this->db);
|
||||
$res = $recipient->fetch($actionCommReminder->fk_user);
|
||||
if ($res > 0) {
|
||||
if (!empty($recipient->email)) {
|
||||
$to = $recipient->email;
|
||||
} else {
|
||||
$errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user.";
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
$errormesg = "Failed to send remind to user id=".$actionCommReminder->fk_user.". No email defined for user.";
|
||||
$errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user;
|
||||
$error++;
|
||||
}
|
||||
|
||||
// Sender
|
||||
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
|
||||
if (empty($from)) {
|
||||
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// Errors Recipient
|
||||
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
|
||||
|
||||
// Mail Creation
|
||||
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
|
||||
|
||||
// Sending Mail
|
||||
if ($cMailFile->sendfile()) {
|
||||
$nbMailSend++;
|
||||
} else {
|
||||
$errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.implode(',', $cMailFile->errors);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
|
||||
|
||||
$res = $actionCommReminder->update($user);
|
||||
if ($res < 0) {
|
||||
$errorsMsg[] = "Failed to update status to done of ActionComm Reminder";
|
||||
$error++;
|
||||
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||
}
|
||||
} else {
|
||||
$actionCommReminder->status = $actionCommReminder::STATUS_ERROR;
|
||||
$actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1);
|
||||
|
||||
$res = $actionCommReminder->update($user);
|
||||
if ($res < 0) {
|
||||
$errorsMsg[] = "Failed to update status to error of ActionComm Reminder";
|
||||
$error++;
|
||||
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||
} else {
|
||||
$errorsMsg[] = $errormesg;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$errormesg = "Failed to load recipient with user id=".$actionCommReminder->fk_user;
|
||||
$errorsMsg[] = 'Failed to fetch record thirdparty on actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
|
||||
$error++;
|
||||
}
|
||||
|
||||
// Sender
|
||||
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
|
||||
if (empty($from)) {
|
||||
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// Errors Recipient
|
||||
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
|
||||
|
||||
// Mail Creation
|
||||
$cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', '');
|
||||
|
||||
// Sending Mail
|
||||
if ($cMailFile->sendfile()) {
|
||||
$nbMailSend++;
|
||||
} else {
|
||||
$errormesg = 'Failed to send email to: '.$to.' '.$cMailFile->error.implode(',', $cMailFile->errors);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$actionCommReminder->status = $actionCommReminder::STATUS_DONE;
|
||||
|
||||
$res = $actionCommReminder->update($user);
|
||||
if ($res < 0) {
|
||||
$errorsMsg[] = "Failed to update status to done of ActionComm Reminder";
|
||||
$error++;
|
||||
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||
}
|
||||
} else {
|
||||
$actionCommReminder->status = $actionCommReminder::STATUS_ERROR;
|
||||
$actionCommReminder->lasterror = dol_trunc($errormesg, 128, 'right', 'UTF-8', 1);
|
||||
|
||||
$res = $actionCommReminder->update($user);
|
||||
if ($res < 0) {
|
||||
$errorsMsg[] = "Failed to update status to error of ActionComm Reminder";
|
||||
$error++;
|
||||
break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first.
|
||||
} else {
|
||||
$errorsMsg[] = $errormesg;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -1435,7 +1435,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||
$tmpcontact->fetch($event->contact_id);
|
||||
$cachecontacts[$event->contact_id] = $tmpcontact;
|
||||
}
|
||||
$cases2[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
|
||||
$cases3[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
|
||||
}
|
||||
}
|
||||
if ($event->date_start_in_calendar < $c && $dateendtouse > $b2) {
|
||||
|
|
|
|||
|
|
@ -554,7 +554,11 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// Bank card
|
||||
$head = bank_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'journal', $langs->trans("FinancialAccount"), 0, 'account');
|
||||
$activetab = 'journal';
|
||||
if ($action == 'reconcile') {
|
||||
$activetab = 'reconcile';
|
||||
}
|
||||
print dol_get_fiche_head($head, $activetab, $langs->trans("FinancialAccount"), 0, 'account');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
|
@ -566,7 +570,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
/*
|
||||
* Buttons actions
|
||||
*/
|
||||
|
||||
/* Moved into tab
|
||||
if ($action != 'reconcile') {
|
||||
if ($object->canBeConciliated() > 0) {
|
||||
$allowautomaticconciliation = false; // TODO
|
||||
|
|
@ -598,6 +602,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,";
|
||||
|
|
@ -1032,8 +1037,8 @@ if ($resql) {
|
|||
print '<input type="submit" class="button" name="confirm_reconcile" value="'.$langs->trans("Conciliate").'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("otherwise").'</span> ';
|
||||
print '<input type="submit" class="button small" name="confirm_savestatement" value="'.$langs->trans("SaveStatementOnly").'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("or").'</span> ';
|
||||
print '<input type="submit" name="cancel" class="button button-cancel small" value="'.$langs->trans("Cancel").'">';
|
||||
//print ' <span class="opacitymedium">'.$langs->trans("or").'</span> ';
|
||||
//print '<input type="submit" name="cancel" class="button button-cancel small" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ if (empty($numref)) {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
/* Moved as a tab
|
||||
if ($object->canBeConciliated() > 0) {
|
||||
$allowautomaticconciliation = false; // TODO
|
||||
$titletoconciliatemanual = $langs->trans("Conciliate");
|
||||
|
|
@ -339,6 +339,7 @@ if (empty($numref)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ if (GETPOST("account") || GETPOST("ref")) {
|
|||
$morehtml = '';
|
||||
$limit = 0;
|
||||
|
||||
print_barre_liste($langs->trans("RemainderToPay"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($langs->trans("PlannedTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1);
|
||||
|
||||
|
||||
$solde = $object->solde(0);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
|
|
|
|||
|
|
@ -1472,6 +1472,8 @@ class Facture extends CommonInvoice
|
|||
$this->fk_account = $object->fk_account;
|
||||
$this->cond_reglement_id = $object->cond_reglement_id;
|
||||
$this->mode_reglement_id = $object->mode_reglement_id;
|
||||
$this->fk_incoterms = $object->fk_incoterms;
|
||||
$this->location_incoterms = $object->location_incoterms;
|
||||
$this->availability_id = $object->availability_id;
|
||||
$this->demand_reason_id = $object->demand_reason_id;
|
||||
$this->delivery_date = $object->delivery_date;
|
||||
|
|
|
|||
|
|
@ -9393,14 +9393,14 @@ abstract class CommonObject
|
|||
$out .= getPictoForType($extrafields->attributes[$this->table_element]['type'][$key], ($extrafields->attributes[$this->table_element]['type'][$key] == 'text' ? 'tdtop' : ''));
|
||||
}
|
||||
//$out .= '<!-- type = '.$extrafields->attributes[$this->table_element]['type'][$key].' -->';
|
||||
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
|
||||
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this, $this->table_element);
|
||||
break;
|
||||
case "edit":
|
||||
$listoftypestoshowpicto = explode(',', getDolGlobalString('MAIN_TYPES_TO_SHOW_PICTO', 'email,phone,ip,password'));
|
||||
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], $listoftypestoshowpicto)) {
|
||||
$out .= getPictoForType($extrafields->attributes[$this->table_element]['type'][$key], ($extrafields->attributes[$this->table_element]['type'][$key] == 'text' ? 'tdtop' : ''));
|
||||
}
|
||||
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', '', $this->id, $this->table_element);
|
||||
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', '', $this, $this->table_element);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class ExtraFields
|
|||
public $attributes = array();
|
||||
|
||||
/**
|
||||
* @var array<string,bool|int<0,1>> Array with boolean of status of groups
|
||||
* @var array<string,bool|int<0,1>>|null Array with boolean of status of groups
|
||||
*/
|
||||
public $expand_display;
|
||||
|
||||
|
|
@ -1076,18 +1076,18 @@ class ExtraFields
|
|||
* Return HTML string to put an input field into a page
|
||||
* Code very similar with showInputField of common object
|
||||
*
|
||||
* @param string $key Key of attribute
|
||||
* @param string $key Key of attribute
|
||||
* @param string|array{start:int,end:int} $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value); for dates in filter mode, a range array('start'=><timestamp>, 'end'=><timestamp>) should be provided
|
||||
* @param string $moreparam To add more parameters on html input tag
|
||||
* @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $morecss More css (to defined size of field. Old behaviour: may also be a numeric)
|
||||
* @param int $objectid Current object id
|
||||
* @param string $extrafieldsobjectkey The key to use to store retrieved data (commonly $object->table_element)
|
||||
* @param int $mode 1=Used for search filters
|
||||
* @param string $moreparam To add more parameters on html input tag
|
||||
* @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $morecss More css (to defined size of field. Old behaviour: may also be a numeric)
|
||||
* @param int|CommonObject $object Current object or object ID. Preferably, pass the object itself.
|
||||
* @param string $extrafieldsobjectkey The key to use to store retrieved data (commonly $object->table_element)
|
||||
* @param int $mode 1=Used for search filters
|
||||
* @return string
|
||||
*/
|
||||
public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '', $objectid = 0, $extrafieldsobjectkey = '', $mode = 0)
|
||||
public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '', $object = 0, $extrafieldsobjectkey = '', $mode = 0)
|
||||
{
|
||||
global $conf, $langs, $form;
|
||||
|
||||
|
|
@ -1096,6 +1096,8 @@ class ExtraFields
|
|||
$form = new Form($this->db);
|
||||
}
|
||||
|
||||
$objectid = (is_numeric($object) ? $object : $object->id);
|
||||
|
||||
$out = '';
|
||||
|
||||
if (!preg_match('/options_$/', $keyprefix)) { // Because we work on extrafields, we add 'options_' to prefix if not already added
|
||||
|
|
@ -1120,6 +1122,7 @@ class ExtraFields
|
|||
$list = (string) dol_eval($this->attributes[$extrafieldsobjectkey]['list'][$key], 1, 1, '2');
|
||||
$totalizable = $this->attributes[$extrafieldsobjectkey]['totalizable'][$key];
|
||||
$help = $this->attributes[$extrafieldsobjectkey]['help'][$key];
|
||||
$alwayseditable = $this->attributes[$extrafieldsobjectkey]['alwayseditable'][$key];
|
||||
$hidden = (empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
|
||||
//var_dump('key='.$key.' '.$value.' '.$moreparam.' '.$keysuffix.' '.$keyprefix.' '.$objectid.' '.$extrafieldsobjectkey.' '.$mode);
|
||||
|
|
@ -1935,6 +1938,12 @@ class ExtraFields
|
|||
if (!empty($hidden)) {
|
||||
$out = '<input type="hidden" value="'.$value.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'"/>';
|
||||
}
|
||||
|
||||
// If alwayseditable is false, and object is not in draft, then showOutputField
|
||||
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
|
||||
if ($alwayseditable == 0 && is_object($object) && isset($object->status) && defined(get_class($object)."::STATUS_DRAFT") && $object->status != $object::STATUS_DRAFT) {
|
||||
$out = $this->showOutputField($key, $value, $moreparam, $extrafieldsobjectkey, null, $object);
|
||||
}
|
||||
/* Add comments
|
||||
if ($type == 'date') $out.=' (YYYY-MM-DD)';
|
||||
elseif ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)';
|
||||
|
|
@ -1954,7 +1963,7 @@ class ExtraFields
|
|||
* @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering)
|
||||
* @param string $extrafieldsobjectkey Required (for example $object->table_element).
|
||||
* @param Translate|null $outputlangs Output
|
||||
* @param object $object The parent object of field to show
|
||||
* @param CommonObject $object The parent object of field to show
|
||||
* @return string Formatted value
|
||||
*/
|
||||
public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '', $outputlangs = null, $object = null)
|
||||
|
|
@ -1988,7 +1997,7 @@ class ExtraFields
|
|||
// If alwayseditable is false, and object is not in draft, then we show value instead of input field
|
||||
$showValueInsteadOfInputField = 0; // Variable used to disable update of fields via ajax
|
||||
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
|
||||
if ($alwayseditable == 0 && !is_numeric($object) && isset($object->status) && $object->status != $object::STATUS_DRAFT) {
|
||||
if ($alwayseditable == 0 && is_object($object) && isset($object->status) && defined(get_class($object)."::STATUS_DRAFT") && $object->status != $object::STATUS_DRAFT) {
|
||||
$showValueInsteadOfInputField = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -677,9 +677,11 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
|
|||
|
||||
// Set constant
|
||||
$("#set_" + code).click(function() {
|
||||
console.log("ee");
|
||||
if (warning) {
|
||||
alert(warning);
|
||||
}
|
||||
|
||||
if (input.alert && input.alert.set) {
|
||||
if (input.alert.set.yesButton) yesButton = input.alert.set.yesButton;
|
||||
if (input.alert.set.noButton) noButton = input.alert.set.noButton;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@
|
|||
*/
|
||||
function bank_prepare_head(Account $object)
|
||||
{
|
||||
global $db, $langs, $conf;
|
||||
global $db, $langs, $conf, $user;
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
|
|
@ -52,23 +53,44 @@ function bank_prepare_head(Account $object)
|
|||
$head[$h][2] = 'journal';
|
||||
$h++;
|
||||
|
||||
// if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||
// {
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("PlannedTransactions");
|
||||
$head[$h][2] = 'cash';
|
||||
$h++;
|
||||
// }
|
||||
if ($object->canBeConciliated() > 0) {
|
||||
$allowautomaticconciliation = getDolGlobalBool('MAIN_ALLOW_AUTOMATIC_CONCILIATION'); // TODO
|
||||
$titletoconciliatemanual = $langs->trans("Conciliate");
|
||||
$titletoconciliateauto = $langs->trans("Conciliate");
|
||||
if ($allowautomaticconciliation) {
|
||||
$titletoconciliatemanual .= ' ('.$langs->trans("Manual").')';
|
||||
$titletoconciliateauto .= ' ('.$langs->trans("Auto").')';
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("IOMonthlyReporting");
|
||||
$head[$h][2] = 'annual';
|
||||
$h++;
|
||||
$param = '';
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Graph");
|
||||
$head[$h][2] = 'graph';
|
||||
$h++;
|
||||
// If not cash account and can be reconciliate
|
||||
if ($user->hasRight('banque', 'consolidate')) {
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/bankentries_list.php?id=".$object->id.'&action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0&search_account='.$object->id.$param;
|
||||
$head[$h][1] = $titletoconciliatemanual;
|
||||
$head[$h][2] = 'reconcile';
|
||||
$h++;
|
||||
}/* else {
|
||||
$buttonreconcile = '<a class="butActionRefused classfortooltip" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$titletoconciliatemanual.'</a>';
|
||||
}*/
|
||||
|
||||
if ($allowautomaticconciliation) {
|
||||
// If not cash account and can be reconciliate
|
||||
if ($user->hasRight('banque', 'consolidate')) {
|
||||
$newparam = $param;
|
||||
$newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam);
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/bankentries_list.php?id=".$object->id.'&action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0&search_account='.$object->id.$newparam;
|
||||
$head[$h][1] = $titletoconciliateauto;
|
||||
$head[$h][2] = 'reconcileauto';
|
||||
$h++;
|
||||
|
||||
//$buttonreconcile .= ' <a class="butAction" style="margin-bottom: 5px !important; margin-top: 5px !important" href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0'.$newparam.'">'.$titletoconciliateauto.'</a>';
|
||||
}/* else {
|
||||
$buttonreconcile .= ' <a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$titletoconciliateauto.'</a>';
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if ($object->type != Account::TYPE_CASH || getDolGlobalString('BANK_CAN_RECONCILIATE_CASHACCOUNT')) {
|
||||
$nbReceipts = 0;
|
||||
|
|
@ -110,6 +132,21 @@ function bank_prepare_head(Account $object)
|
|||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("IOMonthlyReporting");
|
||||
$head[$h][2] = 'annual';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Graph");
|
||||
$head[$h][2] = 'graph';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$object->id;
|
||||
$head[$h][1] = $langs->trans("PlannedTransactions");
|
||||
$head[$h][2] = 'cash';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
|
|
|||
|
|
@ -1898,7 +1898,7 @@ function dol_init_file_process($pathtoscan = '', $trackid = '')
|
|||
* @param int<0,1> $generatethumbs 1=Generate also thumbs for uploaded image files
|
||||
* @param ?Object $object Object used to set 'src_object_*' fields
|
||||
* @param string $forceFullTestIndexation '1'=Force full text storage in database even if global option not set (consume a high level of data)
|
||||
* @return int Return integer <=0 if KO, >0 if OK
|
||||
* @return int Return integer <=0 if KO, nb of success if OK (>0)
|
||||
* @see dol_remove_file_process()
|
||||
*/
|
||||
function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionordb = 0, $varfiles = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1, $object = null, $forceFullTestIndexation = '')
|
||||
|
|
@ -2041,7 +2041,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionor
|
|||
}
|
||||
}
|
||||
if ($nbok > 0) {
|
||||
$res = 1;
|
||||
$res = $nbok;
|
||||
setEventMessages($langs->trans("FileTransferComplete"), null, 'mesgs');
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
$weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_WEIGHT_ON_PDF', 5)).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
|
||||
}
|
||||
$voltxt = '';
|
||||
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) {
|
||||
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
$voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_VOLUME_ON_PDF', 5)).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
|
||||
}
|
||||
|
||||
|
|
@ -883,13 +883,13 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
if (!empty($totalWeight)) {
|
||||
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs, -1, 'no', 1);
|
||||
}
|
||||
if (!empty($totalVolume)) {
|
||||
if (!empty($totalVolume) && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1);
|
||||
}
|
||||
if (!empty($object->trueWeight)) {
|
||||
$totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, (int) $object->weight_units, "weight", $outputlangs);
|
||||
}
|
||||
if (!empty($object->trueVolume)) {
|
||||
if (!empty($object->trueVolume) && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
if ($object->volume_units < 50) {
|
||||
$totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
$weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_WEIGHT_ON_PDF', 5)).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
|
||||
}
|
||||
$voltxt = '';
|
||||
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) {
|
||||
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
$voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, getDolGlobalInt('SHIPMENT_ROUND_VOLUME_ON_PDF', 5)).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
|
||||
}
|
||||
|
||||
|
|
@ -769,13 +769,13 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
if (!empty($totalWeight)) {
|
||||
$totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs, -1, 'no', 1);
|
||||
}
|
||||
if (!empty($totalVolume)) {
|
||||
if (!empty($totalVolume) && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
$totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1);
|
||||
}
|
||||
if (!empty($object->trueWeight)) {
|
||||
$totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, (int) $object->weight_units, "weight", $outputlangs);
|
||||
}
|
||||
if (!empty($object->trueVolume)) {
|
||||
if (!empty($object->trueVolume) && !getDolGlobalString('SHIPPING_PDF_HIDE_VOLUME')) {
|
||||
$totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var Form $form
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
|
|
@ -81,7 +82,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
|
|||
|
||||
$enabled = 1;
|
||||
if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) {
|
||||
$enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2');
|
||||
$enabled = (int) dol_eval((string) $extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2');
|
||||
}
|
||||
if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) {
|
||||
$enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1, 1, '2');
|
||||
|
|
|
|||
|
|
@ -160,11 +160,13 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
$see_ticket_assignee = 'SeeThisTicketIntomanagementInterface';
|
||||
|
||||
// Send email to notification email
|
||||
// Note: $object->context['disableticketemail'] is set to 1 by public interface at creation because email sending is already managed by page
|
||||
// $object->context['createdfrompublicinterface'] may also be defined when creation done from public interface
|
||||
if (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') && empty($object->context['disableticketemail'])) {
|
||||
$sendto = !getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||
if ($sendto) {
|
||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||
}
|
||||
$sendto = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
|
||||
// if ($sendto) { // already test, can't be empty
|
||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||
// }
|
||||
}
|
||||
|
||||
// Send email to assignee if an assignee was set at creation
|
||||
|
|
@ -196,7 +198,9 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
}
|
||||
|
||||
// Send email to customer
|
||||
if (!getDolGlobalInt('TICKET_DISABLE_CUSTOMER_MAILS') && empty($object->context['disableticketemail']) && $object->notify_tiers_at_create) {
|
||||
// Note: $object->context['disableticketemail'] is set to 1 by public interface at creation because email sending is already managed by page
|
||||
// $object->context['createdfrompublicinterface'] may also be defined when creation done from public interface
|
||||
if (empty($object->context['disableticketemail']) && $object->notify_tiers_at_create) {
|
||||
$sendto = '';
|
||||
|
||||
// if contact selected send to email's contact else send to email's thirdparty
|
||||
|
|
@ -244,15 +248,17 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
$see_ticket_customer = 'TicketCloseEmailBodyInfosTrackUrlCustomer';
|
||||
|
||||
// Send email to notification email
|
||||
// Note: $object->context['disableticketemail'] is set to 1 by public interface at creation but not at closing
|
||||
if (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') && empty($object->context['disableticketemail'])) {
|
||||
$sendto = !getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||
if ($sendto) {
|
||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||
}
|
||||
$sendto = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
|
||||
// if ($sendto) { // already test, can't be empty
|
||||
$this->composeAndSendAdminMessage($sendto, $subject_admin, $body_admin, $object, $langs);
|
||||
// }
|
||||
}
|
||||
|
||||
// Send email to customer.
|
||||
if (!getDolGlobalString('TICKET_DISABLE_CUSTOMER_MAILS') && empty($object->context['disableticketemail'])) {
|
||||
// Note: $object->context['disableticketemail'] is set to 1 by public interface at creation but not at closing
|
||||
if (empty($object->context['disableticketemail'])) {
|
||||
$linked_contacts = $object->listeContact(-1, 'thirdparty');
|
||||
$linked_contacts = array_merge($linked_contacts, $object->listeContact(-1, 'internal'));
|
||||
if (empty($linked_contacts) && getDolGlobalString('TICKET_NOTIFY_AT_CLOSING') && !empty($object->fk_soc)) {
|
||||
|
|
@ -353,7 +359,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
$message_admin .= '<p>'.$langs->trans('Message').' : <br><br>'.$message.'</p><br>';
|
||||
$message_admin .= '<p><a href="'.dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id.'">'.$langs->trans('SeeThisTicketIntomanagementInterface').'</a></p>';
|
||||
|
||||
$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . '<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
|
||||
$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ' : '') . '<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
|
||||
|
||||
$trackid = 'tic'.$object->id;
|
||||
|
||||
|
|
@ -442,7 +448,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
$message_customer .= '<p>'.$langs->trans($see_ticket).' : <a href="'.$url_public_ticket.'">'.$url_public_ticket.'</a></p>';
|
||||
$message_customer .= '<p>'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'</p>';
|
||||
|
||||
$from = (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? '' : getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ').'<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
|
||||
$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ' : '').'<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
|
||||
|
||||
$trackid = 'tic'.$object->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -560,6 +560,14 @@ if (empty($reshook)) {
|
|||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'setdate_shipping' && $user->hasRight('expedition', 'creer')) {
|
||||
$dateshipping = dol_mktime(GETPOSTINT('ship_hour'), GETPOSTINT('ship_min'), 0, GETPOSTINT('ship_month'), GETPOSTINT('ship_day'), GETPOSTINT('ship_year'));
|
||||
|
||||
$object->fetch($id);
|
||||
$result = $object->setShippingDate($user, $dateshipping);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif (in_array($action, array('settracking_number', 'settracking_url', 'settrueWeight', 'settrueWidth', 'settrueHeight', 'settrueDepth', 'setshipping_method_id')) && $user->hasRight('expedition', 'creer')) {
|
||||
// Action update
|
||||
$error = 0;
|
||||
|
|
@ -2061,10 +2069,10 @@ if ($action == 'create') {
|
|||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editdate_shipping') {
|
||||
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||
print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'liv_', 1, 1, 0, "setdate_shipping", 1, 0);
|
||||
print '<input type="hidden" name="action" value="setdate_shipping">';
|
||||
print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0);
|
||||
print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2223,6 +2223,34 @@ class Expedition extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the shipping date
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param integer $shipping_date Date of shipping
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setShippingDate($user, $shipping_date)
|
||||
{
|
||||
if ($user->hasRight('expedition', 'creer')) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition";
|
||||
$sql .= " SET date_expedition = ".($shipping_date ? "'".$this->db->idate($shipping_date)."'" : 'null');
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::setShippingDate", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$this->date_shipping = $shipping_date;
|
||||
return 1;
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Fetch deliveries method and return an array. Load array this->meths(rowid=>label).
|
||||
|
|
|
|||
|
|
@ -349,7 +349,8 @@ ALTER TABLE llx_societe_commerciaux ADD COLUMN fk_c_type_contact_code varchar(32
|
|||
-- VPGSQL8.2 DROP INDEX uk_societe_commerciaux;
|
||||
ALTER TABLE llx_societe_commerciaux ADD UNIQUE INDEX uk_societe_commerciaux_c_type_contact (fk_soc, fk_user, fk_c_type_contact_code);
|
||||
ALTER TABLE llx_c_type_contact ADD INDEX idx_c_type_contact_code (code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
--Removed, not unique. ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
ALTER TABLE llx_societe_commerciaux DROP FOREIGN KEY fk_societe_commerciaux_fk_c_type_contact_code;
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
-- ===================================================================
|
||||
|
||||
ALTER TABLE llx_societe_commerciaux ADD UNIQUE INDEX uk_societe_commerciaux_c_type_contact (fk_soc, fk_user, fk_c_type_contact_code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
--Removed, not unique. ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ DeleteTransaction=Delete entry
|
|||
ConfirmDeleteTransaction=Are you sure you want to delete this entry?
|
||||
ThisWillAlsoDeleteBankRecord=This will also delete generated bank entry
|
||||
BankMovements=Movements
|
||||
PlannedTransactions=Planned entries
|
||||
PlannedTransactions=Upcoming entries
|
||||
Graph=Graphs
|
||||
ExportDataset_banque_1=Bank entries and account statement
|
||||
ExportDataset_banque_2=Deposit slip
|
||||
|
|
|
|||
|
|
@ -348,3 +348,4 @@ QtyViewed=Quantity viewed
|
|||
QtyStock=Quantity on stock
|
||||
QtyRegulated=Quantity on stock correction
|
||||
InventoryEntrepot=Warehouse identity
|
||||
SelectedWarehouse=Select a warehouse
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ TicketPublicAccess=A public interface requiring no identification is available a
|
|||
TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries
|
||||
TicketParamModule=Module variable setup
|
||||
TicketParamMail=Email setup
|
||||
TicketEmailNotificationFrom=Sender e-mail for notification on answers
|
||||
TicketEmailNotificationFromHelp=Sender e-mail to use to send the notification email when an answer is provided inside the back office. For example noreply@example.com
|
||||
TicketEmailNotificationFrom=Sender e-mail for notification on tickets
|
||||
TicketEmailNotificationFromHelp=Sender e-mail to use to send the notification emails for tickets creation or messages. For example noreply@example.com
|
||||
TicketEmailNotificationTo=Notify ticket creation to this e-mail address
|
||||
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation
|
||||
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation (in addition to any other default recipients)
|
||||
TicketNewEmailBodyLabel=Text message sent after creating a ticket
|
||||
TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added.
|
||||
TicketParamPublicInterface=Public interface setup
|
||||
|
|
@ -96,7 +96,9 @@ TicketPublicInterfaceTextHelpMessageHelpAdmin=This text will appear above the me
|
|||
ExtraFieldsTicket=Extra attributes
|
||||
TicketCkEditorEmailNotActivated=HTML editor is not activated. Please put FCKEDITOR_ENABLE_MAIL content to 1 to get it.
|
||||
TicketsDisableEmail=Do not send emails for ticket creation or message recording
|
||||
TicketsDisableEmailHelp=By default, emails are sent when new tickets or messages created. Enable this option to disable *all* email notifications
|
||||
TicketsDisableEmailHelp=By default, notification emails to third parties are sent when new tickets or messages are created for both backoffice and public interface. Enable this option to disable email notifications to thirdparties when creation is done from backoffice.
|
||||
TicketsNotifyThirdPartyFromBackOfficeByDefault=Notify third party by default on ticket creation from backoffice
|
||||
TicketsNotifyThirdPartyFromBackOfficeByDefaultHelp=When creating a ticket from the backoffice, the option "Notify third party" will be checked by default
|
||||
TicketsLogEnableEmail=Enable log by email
|
||||
TicketsLogEnableEmailHelp=At each change, an email will be sent **to each contact** associated with the ticket.
|
||||
TicketParams=Params
|
||||
|
|
@ -119,7 +121,7 @@ TicketAutoChangeStatusOnAnswerHelp=When a user answers to a ticket, the status w
|
|||
TicketNumberingModules=Tickets numbering module
|
||||
TicketsModelModule=Document templates for tickets
|
||||
TicketNotifyTiersAtCreation=Notify third party at creation
|
||||
TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface
|
||||
TicketsDisableCustomerEmail=Always disable emails to third parties when a ticket is created from the backoffice
|
||||
TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket
|
||||
TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to)
|
||||
TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update)
|
||||
|
|
|
|||
|
|
@ -2539,6 +2539,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
|||
$total_ttc = $resultarray[2];
|
||||
|
||||
if (!getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
|
||||
print '<!-- PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES -->'."\n";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="3">' . $langs->trans('Default') . '</td>';
|
||||
|
||||
|
|
@ -2580,7 +2581,10 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
|||
print '<td class="right"></td>';
|
||||
if (!empty($extralabels)) {
|
||||
foreach ($extralabels as $key) {
|
||||
print '<td class="right"></td>';
|
||||
// Show field if not hidden
|
||||
if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) {
|
||||
print '<td class="right"></td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($user->hasRight('produit', 'supprimer') || $user->hasRight('service', 'supprimer')) {
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ class MouvementStock extends CommonObject
|
|||
return -8;
|
||||
}
|
||||
} else {
|
||||
if (isset($product->stock_warehouse[$entrepot_id]) && (empty($product->stock_warehouse[$entrepot_id]->real) || $product->stock_warehouse[$entrepot_id]->real < abs($qty))) {
|
||||
if (empty($product->stock_warehouse[$entrepot_id]) || empty($product->stock_warehouse[$entrepot_id]->real) || $product->stock_warehouse[$entrepot_id]->real < abs($qty)) {
|
||||
$langs->load("stocks");
|
||||
$this->error = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref;
|
||||
$this->errors[] = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref;
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ if ($usevirtualstock == 0) {
|
|||
$stocklabel = $langs->trans('PhysicalStock');
|
||||
}
|
||||
if (getDolGlobalString('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE') && $fk_entrepot > 0) {
|
||||
$stocklabelbis = $stocklabel.' (Selected warehouse)';
|
||||
$stocklabelbis = $stocklabel.' ('.$langs->trans('SelectedWarehouse').')';
|
||||
$stocklabel .= ' ('.$langs->trans("AllWarehouses").')';
|
||||
}
|
||||
$texte = $langs->trans('Replenishment');
|
||||
|
|
|
|||
|
|
@ -883,7 +883,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object-
|
|||
|
||||
print '</form>';
|
||||
} elseif ($id > 0 || !empty($ref)) {
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
||||
|
||||
// Projet card in view mode
|
||||
|
||||
|
|
@ -1085,6 +1085,11 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object-
|
|||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields' => $arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '<td class="liste_titre maxwidthsearch"> </td>';
|
||||
|
||||
// Action column
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ include_once '../../../main.inc.php'; // Load $user and permissions
|
|||
* @var DoliDB $db
|
||||
*/
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$id = GETPOSTINT('id');
|
||||
$email = GETPOST('email', 'custom', 0, FILTER_VALIDATE_EMAIL);
|
||||
|
||||
|
|
|
|||
|
|
@ -447,6 +447,9 @@ a.vmenu span, span.vmenu, span.vmenu span {
|
|||
.infobox-order_supplier:not(.error) {
|
||||
color: #599caf;
|
||||
}
|
||||
.infobox-order_supplier::before {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.infobox-contrat, .infobox-ticket{
|
||||
color: #3bbfa8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,9 @@ div.login_block_other a {
|
|||
.infobox-order_supplier:not(.pictotitle):not(.error) {
|
||||
color: #599caf;
|
||||
}
|
||||
.infobox-order_supplier::before {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.infobox-contrat, .infobox-ticket{
|
||||
color: #46a676;
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class Ticket extends CommonObject
|
|||
public $cache_msgs_ticket;
|
||||
|
||||
/**
|
||||
* @var int Notify thirdparty at create
|
||||
* @var int Save if a thirdparty was notified at creation at ticket or not
|
||||
*/
|
||||
public $notify_tiers_at_create;
|
||||
|
||||
|
|
@ -2186,7 +2186,7 @@ class Ticket extends CommonObject
|
|||
{
|
||||
if ($this->id) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ticket";
|
||||
$sql .= " SET fk_soc = ".($id > 0 ? $id : "null");
|
||||
$sql .= " SET fk_soc = ".($id > 0 ? (int) $id : "null");
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
dol_syslog(get_class($this).'::setCustomer sql='.$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -2210,7 +2210,7 @@ class Ticket extends CommonObject
|
|||
{
|
||||
if ($this->id) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ticket";
|
||||
$sql .= " SET progress = ".($percent > 0 ? $percent : "null");
|
||||
$sql .= " SET progress = ".($percent > 0 ? (float) $percent : "null");
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
dol_syslog(get_class($this).'::set_progression sql='.$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -2234,7 +2234,7 @@ class Ticket extends CommonObject
|
|||
{
|
||||
if ($this->id) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ticket";
|
||||
$sql .= " SET fk_contract = ".($contractid > 0 ? $contractid : "null");
|
||||
$sql .= " SET fk_contract = ".($contractid > 0 ? (int) $contractid : "null");
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
dol_syslog(get_class($this).'::setContract sql='.$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -2778,10 +2778,10 @@ class Ticket extends CommonObject
|
|||
}
|
||||
|
||||
// Add global email address recipient
|
||||
if (getDolGlobalString('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS') &&
|
||||
getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') && !array_key_exists(getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO'), $sendto)
|
||||
) {
|
||||
$sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
|
||||
if (getDolGlobalString('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS') && !array_key_exists(getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO'), $sendto)) {
|
||||
if (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')) {
|
||||
$sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($sendto)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue