Merge remote-tracking branch 'upstream/develop' into 17b11
This commit is contained in:
commit
758209b6f4
@ -247,6 +247,20 @@ if ($action == 'setdisablebindingonexpensereports') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setenablelettering') {
|
||||
$setenablelettering = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_LETTERING", $setenablelettering, 'yesno', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -466,6 +480,27 @@ print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Lettering params
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans('Options').' '.$langs->trans('Lettering').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ACCOUNTING_ENABLE_LETTERING").'</td>';
|
||||
if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablelettering&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablelettering&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -1034,7 +1034,7 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
|
||||
$nom = $title;
|
||||
$builddate = dol_now();
|
||||
|
||||
@ -498,7 +498,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
||||
@ -758,7 +758,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
||||
@ -701,7 +701,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
||||
@ -187,7 +187,7 @@ if ($object->nature == 2) {
|
||||
|
||||
$title = $langs->trans("GenerationOfAccountingEntries") . ' - ' . $object->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', $title);
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* 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,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/taxes.php
|
||||
* \ingroup tax
|
||||
* \brief Page de configuration du module tax
|
||||
* \brief Page to setup module tax
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
@ -116,6 +116,8 @@ if ($action == 'update') {
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_VAT_RETURN", GETPOST("MAIN_INFO_VAT_RETURN", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION", GETPOST("deadline_day_vat", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
@ -179,6 +181,10 @@ if (empty($mysoc->tva_assuj)) {
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven"><td><label for="deadline_day_vat">'.$langs->trans("DeadlineDayVATSubmission").'</label></td><td>';
|
||||
print '<input placeholder="'.$langs->trans("Example").':21" name="deadline_day_vat" id="deadline_day_vat" class="minwidth200" value="'.(!empty($conf->global->MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION) ? $conf->global->MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION : '').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -1317,7 +1317,7 @@ class ActionComm extends CommonObject
|
||||
dol_syslog(get_class()."::getActions", LOG_DEBUG);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager = new HookManager($this->db);
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('agendadao'));
|
||||
|
||||
|
||||
@ -3347,7 +3347,7 @@ class Propal extends CommonObject
|
||||
public function LibStatut($status, $mode = 1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
global $conf, $hookmanager;
|
||||
|
||||
// Init/load array of translation of status
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
@ -3378,6 +3378,14 @@ class Propal extends CommonObject
|
||||
$statusType = 'status6';
|
||||
}
|
||||
|
||||
|
||||
$parameters = array('status' => $status, 'mode' => $mode);
|
||||
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook
|
||||
|
||||
if ($reshook > 0) {
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
@ -3626,7 +3626,7 @@ class Commande extends CommonOrder
|
||||
public function LibStatut($status, $billed, $mode, $donotshowbilled = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $hookmanager;
|
||||
|
||||
$billedtext = '';
|
||||
if (empty($donotshowbilled)) {
|
||||
@ -3674,6 +3674,19 @@ class Commande extends CommonOrder
|
||||
$mode = 0;
|
||||
}
|
||||
|
||||
$parameters = array(
|
||||
'status' => $status,
|
||||
'mode' => $mode,
|
||||
'billed' => $billed,
|
||||
'donotshowbilled' => $donotshowbilled
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook
|
||||
|
||||
if ($reshook > 0) {
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', array('tooltip' => $labelTooltip));
|
||||
}
|
||||
|
||||
|
||||
@ -1323,6 +1323,60 @@ if (!$error && ($action == 'setsupervisor' && $confirm == 'yes') && $permissiont
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && ($action == 'affectuser' && $confirm == 'yes') && $permissiontoadd) {
|
||||
$db->begin();
|
||||
|
||||
$usertoaffect=GETPOST('usertoaffect');
|
||||
$projectrole=GETPOST('projectrole');
|
||||
$tasksrole=GETPOST('tasksrole');
|
||||
if (!empty($usertoaffect)) {
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $object->fetch($toselectid);
|
||||
//var_dump($contcats);exit;
|
||||
if ($result > 0) {
|
||||
$res = $object->add_contact($usertoaffect, $projectrole, 'internal');
|
||||
if ($res >= 0) {
|
||||
$taskstatic = new Task($db);
|
||||
$task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0);
|
||||
|
||||
foreach ($task_array as $task) {
|
||||
$tasksToAffect = new Task($db);
|
||||
$result = $tasksToAffect->fetch($task->id);
|
||||
if ($result > 0) {
|
||||
$res = $tasksToAffect->add_contact($usertoaffect, $tasksrole, 'internal');
|
||||
if ($res < 0) {
|
||||
setEventMessages($tasksToAffect->error, $tasksToAffect->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
$nbok++;
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setEventMessage('UserNotFound', 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if ($nbok > 1) {
|
||||
setEventMessages($langs->trans("RecordsModified", $nbok), null);
|
||||
} else {
|
||||
setEventMessages($langs->trans("RecordsModified", $nbok), null);
|
||||
}
|
||||
$db->commit();
|
||||
$toselect=array();
|
||||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && ($massaction == 'enable' || ($action == 'enable' && $confirm == 'yes')) && $permissiontoadd) {
|
||||
$db->begin();
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ if (empty($_SESSION['auto_check_events_not_before']) || $time >= $_SESSION['auto
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
||||
$sql .= ' WHERE a.code <> "AC_OTH_AUTO"';
|
||||
$sql .= ' AND (';
|
||||
$sql .= " (ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
|
||||
$sql .= " ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity;
|
||||
$sql .= ' )';
|
||||
} else {
|
||||
$sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.((int) $user->id);
|
||||
|
||||
@ -584,7 +584,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
public function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = -1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
global $langs, $hookmanager;
|
||||
$langs->load('bills');
|
||||
|
||||
if ($type == -1) {
|
||||
@ -634,6 +634,22 @@ abstract class CommonInvoice extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$parameters = array(
|
||||
'status' => $status,
|
||||
'mode' => $mode,
|
||||
'paye' => $paye,
|
||||
'alreadypaid' => $alreadypaid,
|
||||
'type' => $type
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook
|
||||
|
||||
if ($reshook > 0) {
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
@ -1270,7 +1270,7 @@ class FormTicket
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($this->param['langsmodels'])) {
|
||||
$newlang = $this->param['langsmodels'];
|
||||
}
|
||||
if (!empty($newlang)) {
|
||||
@ -1281,7 +1281,7 @@ class FormTicket
|
||||
|
||||
// Get message template for $this->param["models"] into c_email_templates
|
||||
$arraydefaultmessage = -1;
|
||||
if ($this->param['models'] != 'none') {
|
||||
if (isset($this->param['models']) && $this->param['models'] != 'none') {
|
||||
$model_id = 0;
|
||||
if (array_key_exists('models_id', $this->param)) {
|
||||
$model_id = (int) $this->param["models_id"];
|
||||
@ -1323,7 +1323,7 @@ class FormTicket
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($this->param['langsmodels'])) {
|
||||
$newlang = $this->param['langsmodels'];
|
||||
}
|
||||
if (!empty($newlang)) {
|
||||
@ -1380,7 +1380,12 @@ class FormTicket
|
||||
print '<input type="hidden" name="action" value="'.$this->action.'">';
|
||||
print '<input type="hidden" name="actionbis" value="add_message">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$this->backtopage.'">';
|
||||
print '<input type="hidden" name="trackid" value="'.$this->trackid.'">';
|
||||
if (!empty($this->trackid)) {
|
||||
print '<input type="hidden" name="trackid" value="'.$this->trackid.'">';
|
||||
} else {
|
||||
print '<input type="hidden" name="trackid" value="'.(empty($this->track_id) ? '' : $this->track_id).'">';
|
||||
$keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid
|
||||
}
|
||||
foreach ($this->param as $key => $value) {
|
||||
print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
|
||||
}
|
||||
@ -1392,7 +1397,7 @@ class FormTicket
|
||||
$arraydefaultmessage = $formmail->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id);
|
||||
}
|
||||
|
||||
$result = $formmail->fetchAllEMailTemplate($this->param["models"], $user, $outputlangs);
|
||||
$result = $formmail->fetchAllEMailTemplate(!empty($this->param["models"]) ? $this->param["models"] : "", $user, $outputlangs);
|
||||
if ($result < 0) {
|
||||
setEventMessages($this->error, $this->errors, 'errors');
|
||||
}
|
||||
@ -1404,7 +1409,7 @@ class FormTicket
|
||||
print '<table class="border" width="'.$width.'">';
|
||||
|
||||
// External users can't send message email
|
||||
if ($user->rights->ticket->write && !$user->socid) {
|
||||
if ($user->hasRight("ticket", "write") && !$user->socid) {
|
||||
$ticketstat = new Ticket($this->db);
|
||||
$res = $ticketstat->fetch('', '', $this->track_id);
|
||||
|
||||
@ -1556,7 +1561,7 @@ class FormTicket
|
||||
// Deal with format differences between message and signature (text / HTML)
|
||||
if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
|
||||
$this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']);
|
||||
} elseif (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
|
||||
} elseif (!dol_textishtml($defaultmessage) && isset($this->substit['__USER_SIGNATURE__']) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
|
||||
$defaultmessage = dol_nl2br($defaultmessage);
|
||||
}
|
||||
if (GETPOSTISSET("message") && !GETPOST('modelselected')) {
|
||||
@ -1569,7 +1574,7 @@ class FormTicket
|
||||
}
|
||||
|
||||
print '<tr><td colspan="2"><label for="message"><span class="fieldrequired">'.$langs->trans("Message").'</span>';
|
||||
if ($user->rights->ticket->write && !$user->socid) {
|
||||
if ($user->hasRight("ticket", "write") && !$user->socid) {
|
||||
$texttooltip = $langs->trans("TicketMessageHelp");
|
||||
if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO') || getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) {
|
||||
$texttooltip .= '<br><br>'.$langs->trans("ForEmailMessageWillBeCompletedWith").'...';
|
||||
|
||||
@ -1176,6 +1176,18 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy = $pdf->GetY();
|
||||
}
|
||||
|
||||
// Show if Option VAT debit option is on also if transmitter is french
|
||||
// Decret n°2099-1299 2022-10-07
|
||||
// French mention : "Option pour le paiement de la taxe d'après les débits"
|
||||
if ($this->emetteur->country_code == 'FR') {
|
||||
if ($conf->global->TAX_MODE == 1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1);
|
||||
|
||||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Show online payment link
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') {
|
||||
$useonlinepayment = 0;
|
||||
|
||||
@ -1259,7 +1259,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
|
||||
// Show payment mode
|
||||
// Show payment mode
|
||||
if (!empty($object->mode_reglement_code)
|
||||
&& $object->mode_reglement_code != 'CHQ'
|
||||
&& $object->mode_reglement_code != 'VIR') {
|
||||
@ -1286,7 +1286,19 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$posy = $pdf->GetY();
|
||||
}
|
||||
|
||||
// Show online payment link
|
||||
// Show if Option VAT debit option is on also if transmitter is french
|
||||
// Decret n°2099-1299 2022-10-07
|
||||
// French mention : "Option pour le paiement de la taxe d'après les débits"
|
||||
if ($this->emetteur->country_code == 'FR') {
|
||||
if ($conf->global->TAX_MODE == 1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1);
|
||||
|
||||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Show online payment link
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') {
|
||||
$useonlinepayment = 0;
|
||||
if (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) {
|
||||
|
||||
@ -113,6 +113,44 @@ if ($massaction == 'presetsupervisor') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmSetSupervisor"), $langs->trans("ConfirmSetSupervisorQuestion", count($toselect)), "setsupervisor", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
if ($massaction == 'preaffectuser') {
|
||||
$formquestion = array();
|
||||
|
||||
$valuefielduser = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 165px; padding-bottom: 6px; gap: 5px">';
|
||||
$valuefielduser .= img_picto('', 'user').' ';
|
||||
$valuefielduser .= $form->select_dolusers('', 'usertoaffect', 1, $arrayofselected, 0, '', 0, $object->entity, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
|
||||
$valuefielduser .= '</div>';
|
||||
|
||||
$valuefieldprojrole = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px; padding-bottom: 6px">';
|
||||
$valuefieldprojrole .= $formcompany->selectTypeContact($object, '', 'projectrole', 'internal', 'position', 0, 'widthcentpercentminusx maxwidth300', 0);
|
||||
$valuefieldprojrole .= '</div>';
|
||||
|
||||
$valuefieldtasksrole = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px">';
|
||||
$valuefieldtasksrole .= $formcompany->selectTypeContact($taskstatic, '', 'tasksrole', 'internal', 'position', 0, 'widthcentpercentminusx maxwidth300', 0);
|
||||
$valuefieldtasksrole .= '</div>';
|
||||
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'usertoaffect',
|
||||
'label' => $langs->trans("User"),
|
||||
'value' => $valuefielduser
|
||||
);
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'projectrole',
|
||||
'label' => $langs->trans("ProjectRole"),
|
||||
'value' => $valuefieldprojrole
|
||||
);
|
||||
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'tasksrole',
|
||||
'label' => $langs->trans("TasksRole"),
|
||||
'value' => $valuefieldtasksrole
|
||||
);
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAffectUser"), $langs->trans("ConfirmAffectUserQuestion", count($toselect)), "affectuser", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
if ($massaction == 'presend') {
|
||||
$langs->load("mails");
|
||||
|
||||
@ -751,7 +751,13 @@ class EcmFiles extends CommonObject
|
||||
}
|
||||
|
||||
// If you need to delete child tables to, you can insert them here
|
||||
|
||||
if (!$error) {
|
||||
$result = $this->deleteExtraFields();
|
||||
if (!$result) {
|
||||
dol_syslog(get_class($this)."::delete error ".$this->error, LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if (!$error) {
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
@ -336,6 +336,7 @@ NumberOfAccountancyMovements=Number of movements
|
||||
ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on sales (customer invoices will not be taken into account in accounting)
|
||||
ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting)
|
||||
ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
|
||||
ACCOUNTING_ENABLE_LETTERING=Enable the lettering function in the accounting
|
||||
|
||||
## Export
|
||||
NotExportLettering=Do not export the lettering when generating the file
|
||||
|
||||
@ -2338,3 +2338,4 @@ DesktopsOnly=Desktops only
|
||||
DesktopsAndSmartphones=Desktops et smartphones
|
||||
AllowOnlineSign=Allow online signing
|
||||
AllowExternalDownload=Allow external download (without login, using a shared link)
|
||||
DeadlineDayVATSubmission=Deadline day for vat submission on the next month
|
||||
|
||||
@ -625,3 +625,4 @@ PaymentRegisteredAndInvoiceSetToPaid=Payment registered and invoice %s set to pa
|
||||
SendEmailsRemindersOnInvoiceDueDate=Send reminder by email for unpaid invoices
|
||||
MakePaymentAndClassifyPayed=Record payment
|
||||
BulkPaymentNotPossibleForInvoice=Bulk payment is not possible for invoice %s (bad type or status)
|
||||
MentionVATDebitOptionIsOn=Option to pay tax based on debits
|
||||
|
||||
@ -1146,12 +1146,17 @@ UpdateForAllLines=Update for all lines
|
||||
OnHold=On hold
|
||||
Civility=Civility
|
||||
AffectTag=Affect Tag
|
||||
AffectUser=Affect User
|
||||
SetSupervisor=Set Supervisor
|
||||
CreateExternalUser=Create external user
|
||||
ConfirmAffectTag=Bulk Tag Affect
|
||||
ConfirmAffectUser=Bulk User Affect
|
||||
ProjectRole=Role assigned on each project
|
||||
TasksRole=Role assigned on each task of each project
|
||||
ConfirmSetSupervisor=Bulk Supervisor Set
|
||||
ConfirmUpdatePrice=Choose a increase/decrease price rate
|
||||
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?
|
||||
ConfirmAffectUserQuestion=Are you sure you want to affect users to the %s selected record(s)?
|
||||
ConfirmSetSupervisorQuestion=Are you sure you want to set supervisor to the %s selected record(s)?
|
||||
ConfirmUpdatePriceQuestion=Are you sure you want to update the price of the %s selected record(s)?
|
||||
CategTypeNotFound=No tag type found for type of records
|
||||
|
||||
@ -1146,13 +1146,18 @@ UpdateForAllLines=Mise à jour de toutes les lignes
|
||||
OnHold=En attente
|
||||
Civility=Civilité
|
||||
AffectTag=Affecter un tag/catégorie
|
||||
AffectUser=Affecter un utilisateur
|
||||
SetSupervisor=Choisir un superviseur
|
||||
CreateExternalUser=Créer utilisateur externe
|
||||
ConfirmAffectTag=Affecter les tags en masse
|
||||
ConfirmSetSupervisor=Choisir un superviseur en masse
|
||||
ConfirmAffectUser=Affecter les utilisateurs en masse
|
||||
ProjectRole=Role attribué pour chaque projet
|
||||
TasksRole=Role attribué pour chaque tâche de chaque projet
|
||||
ConfirmUpdatePrice=Choisir un pourcentage de hausse/baisse des prix
|
||||
ConfirmAffectTagQuestion=Êtes-vous sur de vouloir affecter ces catégories aux %s lignes sélectionnées ?
|
||||
ConfirmSetSupervisorQuestion=Êtes-vous sur de vouloir affecter ce superviseur aux %s lignes sélectionnées ?
|
||||
ConfirmAffectUserQuestion=Êtes-vous sur de vouloir affecter cet utilisateur aux %s lignes sélectionnées ?
|
||||
ConfirmUpdatePriceQuestion=Êtes-vous sur de vouloir mettre à jour les prix des %s lignes sélectionnées ?
|
||||
CategTypeNotFound=Aucun type de tag trouvé pour ce type d'enregistrements
|
||||
Rate=Taux
|
||||
|
||||
@ -35,6 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
@ -355,8 +357,10 @@ if (empty($reshook)) {
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
$companystatic = new Societe($db);
|
||||
$taskstatic = new Task($db);
|
||||
$formother = new FormOther($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
@ -802,6 +806,7 @@ $arrayofmassactions = array(
|
||||
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->projet->creer) {
|
||||
$arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Close");
|
||||
$arrayofmassactions['preaffectuser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("AffectUser");
|
||||
}
|
||||
if ($user->rights->projet->supprimer) {
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
@ -809,7 +814,7 @@ if ($user->rights->projet->supprimer) {
|
||||
if (isModEnabled('category') && $user->rights->projet->creer) {
|
||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
||||
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'preaffectuser'))) {
|
||||
$arrayofmassactions = array();
|
||||
}
|
||||
|
||||
|
||||
@ -310,11 +310,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($searched_companies)) {
|
||||
if (!empty($searched_companies) && is_array($searched_companies)) {
|
||||
$object->fk_soc = $searched_companies[0]->id;
|
||||
}
|
||||
|
||||
if (is_array($contacts) and count($contacts) > 0) {
|
||||
if (is_array($contacts) && count($contacts) > 0) {
|
||||
$object->fk_soc = $contacts[0]->socid;
|
||||
$usertoassign = $contacts[0]->id;
|
||||
}
|
||||
@ -329,7 +329,7 @@ if (empty($reshook)) {
|
||||
if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
|
||||
$error++;
|
||||
$errors = array($langs->trans("AlreadyTooMuchPostOnThisIPAdress"));
|
||||
array_push($object->errors, array($langs->trans("AlreadyTooMuchPostOnThisIPAdress")));
|
||||
array_push($object->errors, $langs->trans("AlreadyTooMuchPostOnThisIPAdress"));
|
||||
$action = 'create_ticket';
|
||||
}
|
||||
|
||||
|
||||
@ -62,6 +62,8 @@ $cancel = GETPOST('cancel', 'aZ09');
|
||||
|
||||
$track_id = GETPOST('track_id', 'alpha');
|
||||
$email = strtolower(GETPOST('email', 'alpha'));
|
||||
$suffix = "";
|
||||
$moreforfilter = "";
|
||||
|
||||
if (GETPOST('btn_view_ticket_list')) {
|
||||
unset($_SESSION['track_id_customer']);
|
||||
@ -364,7 +366,7 @@ if ($action == "view_ticketlist") {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = t.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople sp ON ec.fk_socpeople = sp.rowid";
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."ticket_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
}
|
||||
$sql .= " WHERE t.entity IN (".getEntity('ticket').")";
|
||||
@ -736,7 +738,7 @@ if ($action == "view_ticketlist") {
|
||||
print '</p>';
|
||||
|
||||
print '<p><label for="email" style="display: inline-block; width: 30%; "><span class="fieldrequired">'.$langs->trans('Email').'</span></label>';
|
||||
print '<input size="30" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $_SESSION['customer_email']).'" />';
|
||||
print '<input size="30" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : (!empty($_SESSION['customer_email']) ? $_SESSION['customer_email'] : "")).'" />';
|
||||
print '</p>';
|
||||
|
||||
print '<p style="text-align: center; margin-top: 1.5em;">';
|
||||
|
||||
@ -63,6 +63,7 @@ $cancel = GETPOST('cancel', 'aZ09');
|
||||
|
||||
$track_id = GETPOST('track_id', 'alpha');
|
||||
$email = GETPOST('email', 'email');
|
||||
$suffix = "";
|
||||
|
||||
if (GETPOST('btn_view_ticket')) {
|
||||
unset($_SESSION['email_customer']);
|
||||
@ -205,7 +206,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
||||
$triggersendname = 'TICKET_SENTBYMAIL';
|
||||
$paramname = 'id';
|
||||
$autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add
|
||||
$trackid = 'tic'.$object->id;
|
||||
if (!empty($object->id)) $trackid = 'tic'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||
|
||||
|
||||
@ -401,7 +402,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
||||
print '</p>';
|
||||
|
||||
print '<p><label for="email" style="display: inline-block; width: 30%; "><span class="fieldrequired">'.$langs->trans('Email').'</span></label>';
|
||||
print '<input size="30" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $_SESSION['customer_email']).'" />';
|
||||
print '<input size="30" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : (!empty($_SESSION['customer_email']) ? $_SESSION['customer_email'] : "")).'" />';
|
||||
print '</p>';
|
||||
|
||||
print '<p style="text-align: center; margin-top: 1.5em;">';
|
||||
|
||||
@ -199,7 +199,7 @@ class ActionsTicket
|
||||
print '<tr class="liste_titre trforfield"><td class="nowrap titlefield">';
|
||||
print $langs->trans("InitialMessage");
|
||||
print '</td><td>';
|
||||
if ($user->rights->ticket->manage) {
|
||||
if ($user->hasRight("ticket", "manage")) {
|
||||
print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=edit_message_init&token='.newToken().'&track_id='.$object->track_id.'">'.img_edit($langs->trans('Modify')).'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1666,7 +1666,7 @@ class Ticket extends CommonObject
|
||||
*/
|
||||
public function loadCacheMsgsTicket()
|
||||
{
|
||||
if (is_array($this->cache_msgs_ticket) && count($this->cache_msgs_ticket)) {
|
||||
if (!empty($this->cache_msgs_ticket) && is_array($this->cache_msgs_ticket) && count($this->cache_msgs_ticket)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user