mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
3
.github/changed-lines-count-labeler.yml
vendored
Normal file
3
.github/changed-lines-count-labeler.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Add this tag for any changes for more than 1 line
|
||||
"Pending analysis of PR (maintenance team)":
|
||||
min: 1
|
||||
20
.github/workflows/pr-18-autolabel.yaml
vendored
Normal file
20
.github/workflows/pr-18-autolabel.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: "Set label for v18"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "18.0"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
jobs:
|
||||
changed-lines-count-labeler:
|
||||
runs-on: ubuntu-latest
|
||||
name: An action for automatically labelling pull requests based on the changed lines count
|
||||
steps:
|
||||
- name: Set a label
|
||||
uses: vkirilichev/changed-lines-count-labeler@v0.2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/changed-lines-count-labeler.yml
|
||||
34
.github/workflows/pr-18.yaml
vendored
34
.github/workflows/pr-18.yaml
vendored
@@ -1,3 +1,4 @@
|
||||
name: Set reviewer for v18
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
@@ -7,15 +8,13 @@ on:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
run:
|
||||
pr18:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
#env:
|
||||
# GH_TOKEN: ${{ github.token }}
|
||||
# GH_TOKENS: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -26,20 +25,31 @@ jobs:
|
||||
sudo apt update
|
||||
sudo apt install gh -y
|
||||
|
||||
#- name: Authenticate GitHub CLI
|
||||
# run: |
|
||||
# echo "GH_TOKEN=$GH_TOKEN"
|
||||
# gh auth login --with-token <<< "$GH_TOKEN"
|
||||
|
||||
- name: Assign reviewer
|
||||
env:
|
||||
#REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||
REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
echo "GH_TOKEN=$GH_TOKEN"
|
||||
echo "Run action by ${{ github.actor }}"
|
||||
# shellcheck disable=2086
|
||||
echo "github.token=${{ github.token }}"
|
||||
# shellcheck disable=2086
|
||||
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
|
||||
# shellcheck disable=2086
|
||||
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
|
||||
# shellcheck disable=2086
|
||||
echo Get the pr_number
|
||||
# shellcheck disable=2086
|
||||
pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH)
|
||||
# shellcheck disable=2086
|
||||
echo "pr_number=$pr_number"
|
||||
# shellcheck disable=2086
|
||||
echo Authenticate login gh
|
||||
# shellcheck disable=2086
|
||||
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
|
||||
# shellcheck disable=2086
|
||||
echo Set the reviewere
|
||||
# shellcheck disable=2086
|
||||
gh pr edit $pr_number --add-reviewer "$REVIEWER"
|
||||
continue-on-error: true
|
||||
|
||||
20
.github/workflows/test.yaml
vendored
20
.github/workflows/test.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Test
|
||||
name: Test github actions
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
@@ -6,8 +6,13 @@ on:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
#permissions: write-all
|
||||
#permissions: {} # none
|
||||
env:
|
||||
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
|
||||
ENVGHU: ${{ github.token }}
|
||||
VARAAA: ${{ vars.AAA }}
|
||||
SECBBB: ${{ secrets.BBB }}
|
||||
VARREPORGCCC: ${{ vars.CCC }}
|
||||
ENVFIX: "abc"
|
||||
|
||||
jobs:
|
||||
testjob:
|
||||
@@ -15,8 +20,15 @@ jobs:
|
||||
steps:
|
||||
- name: Log
|
||||
run: |
|
||||
echo "repo-token: ${{ secrets.GITHUB_TOKEN }}"
|
||||
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
|
||||
echo "variable org: ${{vars.AAA}}"
|
||||
echo "env prg: ${{env.AAA}}"
|
||||
echo "env prg: ${{env.VARAAA}}"
|
||||
echo "secret org: ${{secrets.BBB}}"
|
||||
echo "variable repository of orga: ${{vars.CCC}}"
|
||||
echo "ENVGHT: ${{env.ENVGHT}}"
|
||||
echo "ENVGHU: ${{env.ENVGHU}}"
|
||||
echo "VARAAA: ${{env.VARAAA}}"
|
||||
echo "ENVAAA: ${{env.VARAAA}}"
|
||||
echo "VARREPORGCCC: ${{env.VARREPORGCCC}}"
|
||||
echo "ENVFIX: ${{env.abc}}"
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -90,3 +90,6 @@ phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/.cache
|
||||
|
||||
# ignore .htaccess files
|
||||
.htaccess
|
||||
|
||||
@@ -1381,7 +1381,26 @@ if ($id > 0) {
|
||||
|
||||
$tablecode = 't.code';
|
||||
$tableprefix = '';
|
||||
$tableprefixarray = array(DICT_FORME_JURIDIQUE => 'f.code', DICT_DEPARTEMENTS => 'd.code_departement', DICT_REGIONS => 'r.code_region', DICT_COUNTRY => 'c.code', DICT_CIVILITY => 'c.code', DICT_ACTIONCOMM => 'a.code', DICT_CURRENCIES => 'code_iso', DICT_ECOTAXE => 'e.code', DICT_HOLIDAY_TYPES => 'h.code', DICT_CHARGESOCIALES => 'a.code', DICT_HRM_PUBLIC_HOLIDAY => 'a.code', DICT_UNITS => 'r.code', DICT_SOCIALNETWORKS => 's.code', 45 => 'f.code', 46 => 'f.code', 47 => 'f.code', 48 => 'f.code');
|
||||
$tableprefixarray = array(
|
||||
DICT_FORME_JURIDIQUE => 'f.code',
|
||||
DICT_DEPARTEMENTS => 'd.code_departement',
|
||||
DICT_REGIONS => 'r.code_region',
|
||||
DICT_COUNTRY => 'c.code',
|
||||
DICT_CIVILITY => 'c.code',
|
||||
DICT_ACTIONCOMM => 'a.code',
|
||||
DICT_CHARGESOCIALES => 'a.code',
|
||||
DICT_TYPENT => 't.code',
|
||||
DICT_CURRENCIES => 'c.code_iso',
|
||||
DICT_ECOTAXE => 'e.code',
|
||||
DICT_HOLIDAY_TYPES => 'h.code',
|
||||
DICT_HRM_PUBLIC_HOLIDAY => 'a.code',
|
||||
DICT_UNITS => 'r.code',
|
||||
DICT_SOCIALNETWORKS => 's.code',
|
||||
45 => 'f.code',
|
||||
46 => 'f.code',
|
||||
47 => 'f.code',
|
||||
48 => 'f.code',
|
||||
);
|
||||
if (!empty($tableprefixarray[$id])) {
|
||||
$tablecode = $tableprefixarray[$id];
|
||||
$tableprefix = preg_replace('/\..*$/', '.', $tablecode);
|
||||
|
||||
@@ -76,6 +76,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||
$res3 = 1;
|
||||
$res4 = 1;
|
||||
$res5 = 1;
|
||||
$res6 = 1;
|
||||
if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) {
|
||||
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
@@ -91,7 +92,10 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||
if (GETPOSTISSET('MAIN_SECURITY_MAX_ATTACHMENT_ON_FORMS')) {
|
||||
$res5 = dolibarr_set_const($db, "MAIN_SECURITY_MAX_ATTACHMENT_ON_FORMS", GETPOST("MAIN_SECURITY_MAX_ATTACHMENT_ON_FORMS", 'alphanohtml'), 'int', 0, '', $conf->entity);
|
||||
}
|
||||
if ($res1 && $res2 && $res3 && $res4 && $res5) {
|
||||
if (GETPOSTISSET('MAIN_SECURITY_MAX_NUMBER_FAILED_AUTH')) {
|
||||
$res6 = dolibarr_set_const($db, "MAIN_SECURITY_MAX_NUMBER_FAILED_AUTH", GETPOST("MAIN_SECURITY_MAX_NUMBER_FAILED_AUTH", 'alphanohtml'), 'int', 0, '', $conf->entity);
|
||||
}
|
||||
if ($res1 && $res2 && $res3 && $res4 && $res5 && $res6) {
|
||||
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ class FormAdvTargetEmailing extends Form
|
||||
}
|
||||
}
|
||||
if (!empty($InfoFieldList[1])) {
|
||||
$sql .= " ORDER BY nom";
|
||||
$sql .= $this->db->order($InfoFieldList[1]);
|
||||
}
|
||||
// $sql.= ' WHERE entity = '.$conf->entity;
|
||||
|
||||
@@ -334,8 +334,10 @@ class FormAdvTargetEmailing extends Form
|
||||
if ($num) {
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$fieldtoread = $InfoFieldList[1];
|
||||
$labeltoshow = dol_trunc($obj->$fieldtoread, 90);
|
||||
|
||||
$options_array[$obj->rowid] = $labeltoshow;
|
||||
$i++;
|
||||
}
|
||||
@@ -401,6 +403,20 @@ class FormAdvTargetEmailing extends Form
|
||||
global $conf, $langs;
|
||||
|
||||
$form = new Form($this->db);
|
||||
foreach ($options_array as $okey => $val) {
|
||||
if ((string) $okey == '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$valarray = explode('|', $val);
|
||||
$val = $valarray[0];
|
||||
|
||||
if ($val) {
|
||||
$options_array[$okey] = $langs->trans($val);
|
||||
} else {
|
||||
$options_array[$okey] = $val;
|
||||
}
|
||||
}
|
||||
$return = $form->multiselectarray($htmlname, $options_array, $selected_array, 0, 0, '', 0, 295);
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -1896,6 +1896,14 @@ if ($action == 'create') {
|
||||
|
||||
if ($element == 'project') {
|
||||
$projectid = $originid;
|
||||
|
||||
// Fetch project and thirdparty
|
||||
$project = new Project($db);
|
||||
$project->fetch($projectid);
|
||||
if ($project->socid > 0) {
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($project->socid);
|
||||
}
|
||||
} else {
|
||||
// For compatibility
|
||||
if ($element == 'order' || $element == 'commande') {
|
||||
@@ -1928,9 +1936,9 @@ if ($action == 'create') {
|
||||
|
||||
$soc = $objectsrc->thirdparty;
|
||||
|
||||
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
|
||||
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
|
||||
$warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
|
||||
$cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
|
||||
$mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
|
||||
$warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
|
||||
|
||||
// Replicate extrafields
|
||||
$objectsrc->fetch_optionals();
|
||||
@@ -1945,7 +1953,10 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
// Load default values from thirdparty
|
||||
if (!empty($soc)) {
|
||||
$cond_reglement_id = empty($soc->cond_reglement_id) ? $cond_reglement_id : $soc->cond_reglement_id;
|
||||
$deposit_percent = empty($soc->deposit_percent) ? $deposit_percent : $soc->deposit_percent;
|
||||
$mode_reglement_id = empty($soc->mode_reglement_id) ? $mode_reglement_id : $soc->mode_reglement_id;
|
||||
|
||||
@@ -105,7 +105,10 @@ $pagenext = $page + 1;
|
||||
$object = new FactureRec($db);
|
||||
if (($id > 0 || $ref) && $action != 'create' && $action != 'add') {
|
||||
$ret = $object->fetch($id, $ref);
|
||||
if (!$ret) {
|
||||
if ($ret < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
exit;
|
||||
} elseif (! $ret) {
|
||||
setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -1424,14 +1427,10 @@ if ($action == 'create') {
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
|
||||
if ($action == 'editconditions') {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
|
||||
} else {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none');
|
||||
}
|
||||
if ($action == 'editconditions') {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
|
||||
} else {
|
||||
print ' ';
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -1799,6 +1798,7 @@ if ($action == 'create') {
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$morehtmlcenter = '';
|
||||
$somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
|
||||
|
||||
print '</div>';
|
||||
|
||||
@@ -721,11 +721,11 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->invoice->update(DolibarrApiAccess::$user)) {
|
||||
if ($this->invoice->update(DolibarrApiAccess::$user) > 0) {
|
||||
return $this->get($id);
|
||||
} else {
|
||||
throw new RestException(500, $this->invoice->error);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1478,6 +1478,7 @@ class FactureRec extends CommonInvoice
|
||||
$nb_create++;
|
||||
$this->output .= $langs->trans("InvoiceGeneratedFromTemplate", $facture->ref, $facturerec->ref)."\n";
|
||||
} else {
|
||||
$this->output .= $langs->trans("InvoiceGeneratedFromTemplateError", $facture->ref, $facturerec->ref, $this->error)."\n";
|
||||
$this->db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref);
|
||||
}
|
||||
|
||||
|
||||
@@ -486,7 +486,8 @@ class Facture extends CommonInvoice
|
||||
$this->type = self::TYPE_STANDARD;
|
||||
}
|
||||
|
||||
$this->ref_client = trim($this->ref_client);
|
||||
$this->ref_client = trim($this->ref_client); // deprecated
|
||||
$this->ref_customer = trim($this->ref_customer);
|
||||
|
||||
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : '');
|
||||
$this->note = (isset($this->note) ? trim($this->note) : $this->note_private); // deprecated
|
||||
@@ -906,17 +907,18 @@ class Facture extends CommonInvoice
|
||||
1
|
||||
);
|
||||
|
||||
if ($result < 0) {
|
||||
$this->error = $newinvoiceline->error;
|
||||
$this->errors = array_merge($this->errors, $newinvoiceline->errors);
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
if ($result > 0 && $newinvoiceline->product_type == 9) {
|
||||
$fk_parent_line = $result;
|
||||
}
|
||||
}
|
||||
if ($result < 0) {
|
||||
$this->error = $newinvoiceline->error;
|
||||
$this->errors = $newinvoiceline->errors;
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif (!$error && empty($this->fac_rec)) { // If this->lines is an array of invoice line arrays
|
||||
$fk_parent_line = 0;
|
||||
@@ -2514,9 +2516,13 @@ class Facture extends CommonInvoice
|
||||
if (isset($this->ref_ext)) {
|
||||
$this->ref_ext = trim($this->ref_ext);
|
||||
}
|
||||
// deprecated
|
||||
if (isset($this->ref_client)) {
|
||||
$this->ref_client = trim($this->ref_client);
|
||||
}
|
||||
if (isset($this->ref_customer)) {
|
||||
$this->ref_customer = trim($this->ref_customer);
|
||||
}
|
||||
if (isset($this->increment)) {
|
||||
$this->increment = trim($this->increment);
|
||||
}
|
||||
@@ -2555,7 +2561,7 @@ class Facture extends CommonInvoice
|
||||
$sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").",";
|
||||
$sql .= " type=".(isset($this->type) ? $this->db->escape($this->type) : "null").",";
|
||||
$sql .= " subtype=".(isset($this->subtype) ? $this->db->escape($this->subtype) : "null").",";
|
||||
$sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").",";
|
||||
$sql .= " ref_client=".(isset($this->ref_customer) ? "'".$this->db->escape($this->ref_customer)."'" : (isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null")).",";
|
||||
$sql .= " increment=".(isset($this->increment) ? "'".$this->db->escape($this->increment)."'" : "null").",";
|
||||
$sql .= " fk_soc=".(isset($this->socid) ? $this->db->escape($this->socid) : "null").",";
|
||||
$sql .= " datec=".(strval($this->date_creation) != '' ? "'".$this->db->idate($this->date_creation)."'" : 'null').",";
|
||||
@@ -2760,7 +2766,8 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->ref_client = $ref_client;
|
||||
$this->ref_client = $ref_client; //deprecated
|
||||
$this->ref_customer = $ref_client;
|
||||
}
|
||||
|
||||
if (!$notrigger && empty($error)) {
|
||||
@@ -2773,7 +2780,8 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->ref_client = $ref_client;
|
||||
$this->ref_client = $ref_client; //deprecated
|
||||
$this->ref_customer = $ref_client;
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
|
||||
@@ -498,22 +498,29 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) {
|
||||
//var_dump($annee.' '.$year_end.' '.$mois.' '.$month_end);
|
||||
if ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) {
|
||||
if ($annee_decalage > $minyear && $case <= $casenow) {
|
||||
if (!empty($cumulative[$caseprev]) && !empty($cumulative[$case])) {
|
||||
$percent = (round(($cumulative[$case] - $cumulative[$caseprev]) / $cumulative[$caseprev], 4) * 100);
|
||||
//print "X $cumulative[$case] - $cumulative[$caseprev] - $cumulative[$caseprev] - $percent X";
|
||||
if ($modecompta=='CREANCES-DETTES') {
|
||||
$cumulative_previous_year = (!empty($cumulative_ht[$caseprev])?$cumulative_ht[$caseprev]:0);
|
||||
$cumulative_year = (!empty($cumulative_ht[$case])?$cumulative_ht[$case]:0);
|
||||
} else {
|
||||
$cumulative_previous_year = (!empty($cumulative[$caseprev])?$cumulative[$caseprev]:0);
|
||||
$cumulative_year = (!empty($cumulative[$case])?$cumulative[$case]:0);
|
||||
}
|
||||
if (!empty($cumulative_previous_year) && !empty($cumulative_year)) {
|
||||
$percent = (round(($cumulative_year - $cumulative_previous_year) / $cumulative_previous_year, 4) * 100);
|
||||
//print "X $cumulative_year - $cumulative_previous_year - $cumulative_previous_year - $percent X";
|
||||
print($percent >= 0 ? "+$percent" : "$percent").'%';
|
||||
}
|
||||
if (!empty($cumulative[$caseprev]) && empty($cumulative[$case])) {
|
||||
if (!empty($cumulative_previous_year) && empty($cumulative_year)) {
|
||||
print '-100%';
|
||||
}
|
||||
if (empty($cumulative[$caseprev]) && !empty($cumulative[$case])) {
|
||||
if (empty($cumulative_previous_year) && !empty($cumulative_year)) {
|
||||
//print '<td class="right">+Inf%</td>';
|
||||
print '-';
|
||||
}
|
||||
if (isset($cumulative[$caseprev]) && empty($cumulative[$caseprev]) && empty($cumulative[$case])) {
|
||||
if (isset($cumulative_previous_year) && empty($cumulative_previous_year) && empty($cumulative_year)) {
|
||||
print '+0%';
|
||||
}
|
||||
if (!isset($cumulative[$caseprev]) && empty($cumulative[$case])) {
|
||||
if (!isset($cumulative_previous_year) && empty($cumulative_year)) {
|
||||
print '-';
|
||||
}
|
||||
} else {
|
||||
@@ -618,7 +625,7 @@ print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td>';
|
||||
for ($annee = $year_start; $annee <= $year_end; $annee++) {
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
// Montant total HT
|
||||
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) {
|
||||
if (isset($total_ht[$annee]) || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) {
|
||||
print '<td class="nowrap right">';
|
||||
print(empty($total_ht[$annee]) ? '0' : price($total_ht[$annee]));
|
||||
print "</td>";
|
||||
@@ -638,19 +645,26 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) {
|
||||
|
||||
// Pourcentage total
|
||||
if ($annee > $minyear && $annee <= max($nowyear, $maxyear)) {
|
||||
if (!empty($total[$annee - 1]) && !empty($total[$annee])) {
|
||||
$percent = (round(($total[$annee] - $total[$annee - 1]) / $total[$annee - 1], 4) * 100);
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$total_previous_year = (!empty($total_ht[$annee - 1])?$total_ht[$annee - 1]:0);
|
||||
$total_year = (!empty($total_ht[$annee])?$total_ht[$annee]:0);
|
||||
} else {
|
||||
$total_previous_year = (!empty($total[$annee - 1])?$total[$annee - 1]:0);
|
||||
$total_year = (!empty($total[$annee])?$total[$annee]:0);
|
||||
}
|
||||
if (!empty($total_previous_year) && !empty($total_year)) {
|
||||
$percent = (round(($total_year - $total_previous_year) / $total_previous_year, 4) * 100);
|
||||
print '<td class="nowrap borderrightlight right">';
|
||||
print($percent >= 0 ? "+$percent" : "$percent").'%';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($total[$annee - 1]) && empty($total[$annee])) {
|
||||
if (!empty($total_previous_year) && empty($total_year)) {
|
||||
print '<td class="borderrightlight right">-100%</td>';
|
||||
}
|
||||
if (empty($total[$annee - 1]) && !empty($total[$annee])) {
|
||||
if (empty($total_previous_year) && !empty($total_year)) {
|
||||
print '<td class="borderrightlight right">+'.$langs->trans('Inf').'%</td>';
|
||||
}
|
||||
if (empty($total[$annee - 1]) && empty($total[$annee])) {
|
||||
if (empty($total_previous_year) && empty($total_year)) {
|
||||
print '<td class="borderrightlight right">+0%</td>';
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1213,8 +1213,8 @@ class DolGraph
|
||||
$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
|
||||
$arrayofgroupslegend[$i] = array(
|
||||
'stacknum' => (int) $tmpykey[1],
|
||||
'legend' => $this->Legend[$tmpykey[1]],
|
||||
'legendwithgroup' => $this->Legend[$tmpykey[1]] . ' - ' . $tmpykey[2]
|
||||
'legend' => $this->Legend[$tmpykey[1]] ?? '',
|
||||
'legendwithgroup' => ($this->Legend[$tmpykey[1]] ?? '') . ' - ' . $tmpykey[2]
|
||||
);
|
||||
} else {
|
||||
$tmpvalue = (array_key_exists('y_' . $i, $valarray) ? $valarray['y_' . $i] : $valarray[$i + 1]);
|
||||
|
||||
@@ -1331,12 +1331,25 @@ class FormSetupItem
|
||||
public function generateOutputFieldColor()
|
||||
{
|
||||
global $langs;
|
||||
$out = '';
|
||||
$this->fieldAttr['disabled'] = null;
|
||||
$color = colorArrayToHex(colorStringToArray($this->fieldValue, array()), '');
|
||||
if ($color) {
|
||||
return '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||
$useDefaultColor = false;
|
||||
if (!$color && !empty($this->defaultFieldValue)) {
|
||||
$color = $this->defaultFieldValue;
|
||||
$useDefaultColor = true;
|
||||
}
|
||||
return $langs->trans("Default");
|
||||
if ($color) {
|
||||
$out.= '<input type="color" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; " value="#'.$color.'">';
|
||||
}
|
||||
|
||||
if ($useDefaultColor) {
|
||||
$out.= ' '.$langs->trans("Default");
|
||||
} else {
|
||||
$out.= ' #'.$color;
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
/**
|
||||
* generateInputFieldColor
|
||||
|
||||
@@ -895,7 +895,7 @@ class FormTicket
|
||||
$ticketstat->loadCacheTypesTickets();
|
||||
|
||||
print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiselect ? '[]' : '').'"'.($multiselect ? ' multiple' : '').'>';
|
||||
if ($empty) {
|
||||
if ($empty && !$multiselect) {
|
||||
print '<option value="">'.((is_numeric($empty) || $empty == 'ifone') ? ' ' : $empty).'</option>';
|
||||
}
|
||||
|
||||
@@ -932,7 +932,7 @@ class FormTicket
|
||||
print ' selected="selected"';
|
||||
} elseif (in_array($id, $selected)) {
|
||||
print ' selected="selected"';
|
||||
} elseif ($arraytypes['use_default'] == "1" && empty($selected)) {
|
||||
} elseif ($arraytypes['use_default'] == "1" && empty($selected) && !$multiselect) {
|
||||
print ' selected="selected"';
|
||||
} elseif (count($ticketstat->cache_types_tickets) == 1 && (!$empty || $empty == 'ifone')) { // If only 1 choice, we autoselect it
|
||||
print ' selected="selected"';
|
||||
|
||||
@@ -314,7 +314,10 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) {
|
||||
if ($key != 'ts_nameextra' && $key != 'ts_payeur') {
|
||||
print '<tr><td>'.$extrafields->attributes[$elementtype]['label'][$key];
|
||||
if (isset($extrafields->attributes[$elementtype]['langfile'][$key])) {
|
||||
$langs->load($extrafields->attributes[$elementtype]['langfile'][$key]);
|
||||
}
|
||||
print '<tr><td>'.$langs->trans($extrafields->attributes[$elementtype]['label'][$key]);
|
||||
if (!empty($array_query['options_'.$key]) || (is_array($array_query['options_'.$key]) && count($array_query['options_'.$key]) > 0)) {
|
||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
@@ -330,9 +333,9 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) {
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td>'.$langs->trans("AdvTgtStartDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt');
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt', 0, 0, 1);
|
||||
print '</td><td>'.$langs->trans("AdvTgtEndDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt');
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt', 0, 0, 1);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td><td>'."\n";
|
||||
@@ -348,19 +351,19 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
|
||||
$array_query['options_'.$key]
|
||||
);
|
||||
print '</td><td>'."\n";
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) {
|
||||
print $formadvtargetemaling->advMultiselectarray('options_'.$key, $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key]);
|
||||
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'select') {
|
||||
print $formadvtargetemaling->advMultiselectarray('options_'.$key, $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key]);
|
||||
print '</td><td>'."\n";
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) {
|
||||
print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key, $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key]);
|
||||
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'sellist') {
|
||||
print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key, $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key]);
|
||||
print '</td><td>'."\n";
|
||||
} else {
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td></td><td>';
|
||||
if (is_array($array_query['options_'.$key])) {
|
||||
print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key]));
|
||||
print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key]), '', '', '', '', 0, 'societe', 1);
|
||||
} else {
|
||||
print $extrafields->showInputField($key, $array_query['options_'.$key]);
|
||||
print $extrafields->showInputField($key, $array_query['options_'.$key], '', '', '', '', 0, 'societe', 1);
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
|
||||
@@ -529,9 +532,9 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) {
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td>'.$langs->trans("AdvTgtStartDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt_cnct');
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt_cnct', 0, 0, 1);
|
||||
print '</td><td>'.$langs->trans("AdvTgtEndDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt_cnct');
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt_cnct', 0, 0, 1);
|
||||
print '</td></tr></table>';
|
||||
print '</td><td>'."\n";
|
||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||
@@ -546,17 +549,17 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
|
||||
$array_query['options_'.$key.'_cnct']
|
||||
);
|
||||
print '</td><td>'."\n";
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) {
|
||||
print $formadvtargetemaling->advMultiselectarray('options_'.$key.'_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key.'_cnct']);
|
||||
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'select') {
|
||||
print $formadvtargetemaling->advMultiselectarray('options_'.$key.'_cnct', $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key.'_cnct']);
|
||||
print '</td><td>'."\n";
|
||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) {
|
||||
print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key.'_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key.'_cnct']);
|
||||
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'sellist') {
|
||||
print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key.'_cnct', $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key.'_cnct']);
|
||||
print '</td><td>'."\n";
|
||||
} else {
|
||||
if (is_array($array_query['options_'.$key.'_cnct'])) {
|
||||
print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key.'_cnct']), '', '_cnct');
|
||||
print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key.'_cnct']), '', '_cnct', '', '', 0, 'socpeople', 1);
|
||||
} else {
|
||||
print $extrafields->showInputField($key, $array_query['options_'.$key.'_cnct'], '', '_cnct');
|
||||
print $extrafields->showInputField($key, $array_query['options_'.$key.'_cnct'], '', '_cnct', '', '', 0, 'socpeople', 1);
|
||||
}
|
||||
print '</td><td>'."\n";
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
}
|
||||
|
||||
// DDOS protection
|
||||
$size = (int) $_SERVER['CONTENT_LENGTH'];
|
||||
$size = (int) ($_SERVER['CONTENT_LENGTH'] ?? 0);
|
||||
if ($size > 10000) {
|
||||
$langs->loadLangs(array("errors", "install"));
|
||||
httponly_accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 413, 1);
|
||||
|
||||
@@ -733,6 +733,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
*/
|
||||
if (! $error && $this->fac_rec > 0 && $_facrec instanceof FactureFournisseurRec) {
|
||||
foreach ($_facrec->lines as $i => $val) {
|
||||
$product_type = $_facrec->lines[$i]->product_type;
|
||||
if ($_facrec->lines[$i]->fk_product) {
|
||||
$prod = new Product($this->db);
|
||||
$res = $prod->fetch($_facrec->lines[$i]->fk_product);
|
||||
@@ -794,7 +795,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
0,
|
||||
$_facrec->lines[$i]->info_bits,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$_facrec->lines[$i]->rang,
|
||||
0,
|
||||
$_facrec->lines[$i]->array_options,
|
||||
|
||||
@@ -534,7 +534,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
|
||||
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', (string) $tva_tx)) {
|
||||
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
||||
}
|
||||
|
||||
@@ -1803,6 +1803,9 @@ if ($resql) {
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Ref
|
||||
if (!empty($arrayfields['cf.ref']['checked'])) {
|
||||
@@ -2120,9 +2123,9 @@ if ($resql) {
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -1347,7 +1347,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
|
||||
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', (string) $tva_tx)) {
|
||||
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
||||
}
|
||||
|
||||
|
||||
@@ -421,6 +421,7 @@ InvoiceAutoValidate=Validate invoices automatically
|
||||
GeneratedFromRecurringInvoice=Generated from template recurring invoice %s
|
||||
DateIsNotEnough=Date not reached yet
|
||||
InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s
|
||||
InvoiceGeneratedFromTemplateError=Error Invoice %s generated from recurring template invoice %s : %s
|
||||
GeneratedFromTemplate=Generated from template invoice %s
|
||||
WarningInvoiceDateInFuture=Warning, the invoice date is higher than current date
|
||||
WarningInvoiceDateTooFarInFuture=Warning, the invoice date is too far from current date
|
||||
@@ -666,6 +667,7 @@ MentionCategoryOfOperations0=Delivery of goods
|
||||
MentionCategoryOfOperations1=Provision of services
|
||||
MentionCategoryOfOperations2=Mixed - Delivery of goods & provision of services
|
||||
Salaries=Salaries
|
||||
InvoiceSubtype=Invoice Subtype
|
||||
SalaryInvoice=Salary
|
||||
BillsAndSalaries=Bills & Salaries
|
||||
CreateCreditNoteWhenClientInvoiceExists=This option is enabled only when validated invoice(s) exist for a customer or when constant INVOICE_CREDIT_NOTE_STANDALONE is used(useful for some countries)
|
||||
|
||||
@@ -108,7 +108,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
llxHeader("", "", $langs->trans("CardProduct".$product->type), '', 0, 0, '', '', '', '', 'mod-product page-stats_supplier_proposal');
|
||||
llxHeader("", $langs->trans("CardProduct".$product->type), '', '', 0, 0, '', '', '', 'mod-product page-stats_supplier_proposal');
|
||||
|
||||
if ($result > 0) {
|
||||
$head = product_prepare_head($product);
|
||||
|
||||
@@ -1261,6 +1261,7 @@ foreach ($listofreferent as $key => $value) {
|
||||
}
|
||||
|
||||
$num = count($elementarray);
|
||||
$total_time = 0;
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$tmp = explode('_', $elementarray[$i]);
|
||||
$idofelement = $tmp[0];
|
||||
|
||||
@@ -103,7 +103,7 @@ class RecruitmentCandidature extends CommonObject
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'comment' => "Id"),
|
||||
'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'position' => 5, 'notnull' => 1, 'default' => '1', 'index' => 1),
|
||||
'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'visible' => 4, 'noteditable' => 1, 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'showoncombobox' => 1, 'comment' => "Reference of candidature", 'csslist' => 'nowraponall'),
|
||||
'fk_recruitmentjobposition' => array('type' => 'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php:0:(t.status:=:1)', 'label' => 'Job', 'enabled' => 1, 'position' => 15, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'picto' => 'recruitmentjobposition', 'css' => 'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist' => 'minwidth100 nowraponall'),
|
||||
'fk_recruitmentjobposition' => array('type' => 'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php:0', 'label' => 'Job', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'picto' => 'recruitmentjobposition', 'css' => 'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist' => 'minwidth100 nowraponall'),
|
||||
'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'position' => 61, 'notnull' => 0, 'visible' => 0,),
|
||||
'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => 1, 'position' => 62, 'notnull' => 0, 'visible' => 0,),
|
||||
'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'position' => 510, 'notnull' => -1, 'visible' => -2, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax100'),
|
||||
@@ -261,6 +261,16 @@ class RecruitmentCandidature extends CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GETPOST("action", "aZ09") == 'create') {
|
||||
$reg = array();
|
||||
preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $this->fields['fk_recruitmentjobposition']['type'], $reg);
|
||||
if (!empty($reg)) {
|
||||
$this->fields['fk_recruitmentjobposition']['type'] .= " AND (t.status:=:1)";
|
||||
} else {
|
||||
$this->fields['fk_recruitmentjobposition']['type'] .= ":(t.status:=:1)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
require '../../main.inc.php';
|
||||
|
||||
if (!getDolGlobalString('TAKEPOS_AUTO_ORDER')) {
|
||||
accessforbidden('Auto order is not allwed'); // If Auto Order is disabled never allow access to this page (that is a NO LOGIN access)
|
||||
accessforbidden('Auto order is not allowed'); // If Auto Order is disabled never allow access to this page (that is a NO LOGIN access)
|
||||
}
|
||||
|
||||
$_SESSION["basiclayout"] = 1; // For the simple layout for public submission
|
||||
@@ -43,9 +43,9 @@ $_SESSION["takeposterminal"] = getDolGlobalInt('TAKEPOS_TERMINAL_NB_FOR_PUBLIC',
|
||||
|
||||
define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
|
||||
if (GETPOSTISSET("mobilepage")) {
|
||||
require DOL_URL_ROOT.'/takepos/invoice.php';
|
||||
require DOL_DOCUMENT_ROOT.'/takepos/invoice.php';
|
||||
} elseif (GETPOSTISSET("genimg")) {
|
||||
require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php';
|
||||
} else {
|
||||
require DOL_URL_ROOT.'/takepos/phone.php';
|
||||
require DOL_DOCUMENT_ROOT.'/takepos/phone.php';
|
||||
}
|
||||
|
||||
@@ -1217,7 +1217,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
}
|
||||
|
||||
// Other form for user password
|
||||
$parameters = array('valuetoshow' => $valuetoshow, 'password' => $password);
|
||||
$parameters = array('valuetoshow' => $valuetoshow, 'password' => $password, 'caneditpasswordandsee' => $caneditpasswordandsee, 'caneditpasswordandsend' => $caneditpasswordandsend);
|
||||
$reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook > 0) {
|
||||
$valuetoshow = $hookmanager->resPrint; // to replace
|
||||
@@ -2041,7 +2041,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
*/
|
||||
|
||||
// Other form for user password
|
||||
$parameters = array('valuetoshow' => $valuetoshow);
|
||||
$parameters = array('valuetoshow' => $valuetoshow, 'caneditpasswordandsee' => $caneditpasswordandsee, 'caneditpasswordandsend' => $caneditpasswordandsend);
|
||||
$reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook > 0) {
|
||||
$valuetoshow = $hookmanager->resPrint; // to replace
|
||||
|
||||
@@ -88,7 +88,7 @@ $hookmanager->initHooks(array('groupcard', 'globalcard'));
|
||||
$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', $feature2);
|
||||
|
||||
// Users/Groups management only in master entity if transverse mode
|
||||
if (isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) {
|
||||
if (isModEnabled('multicompany') && $conf->entity > 1 && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user