mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-08 18:12:53 +01:00
Compare commits
21 Commits
phpstan-ba
...
18.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db3d8a0a1a | ||
|
|
d5cab67f4c | ||
|
|
85a0383b46 | ||
|
|
c981b7ccb6 | ||
|
|
590bf2dd0e | ||
|
|
c25dda01b4 | ||
|
|
f450dd00a8 | ||
|
|
05c11e71e2 | ||
|
|
ad3304832d | ||
|
|
2e22f9e75a | ||
|
|
c017ea0341 | ||
|
|
eb4d9dec53 | ||
|
|
2ca80ffa67 | ||
|
|
8d84cec3ca | ||
|
|
2ee07bb049 | ||
|
|
3416c6ccc0 | ||
|
|
92197cb100 | ||
|
|
9319059349 | ||
|
|
1eed0e18a9 | ||
|
|
2153dbb0f1 | ||
|
|
52446678d0 |
@@ -82,7 +82,7 @@ repos:
|
||||
pass_filenames: false # Run on all files
|
||||
- id: php-lint
|
||||
exclude:
|
||||
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
|
||||
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
|
||||
- id: php-stan
|
||||
stages: [manual]
|
||||
files: \.(php)$
|
||||
|
||||
@@ -128,7 +128,7 @@ tools:
|
||||
enabled: true
|
||||
# Disabled unused code. In most cases, we want to keep it.
|
||||
unused_code:
|
||||
enabled: false
|
||||
enabled: false
|
||||
deprecation_checks:
|
||||
enabled: true
|
||||
useless_function_calls:
|
||||
|
||||
@@ -319,7 +319,7 @@ class CMailFile
|
||||
foreach ($filename_list as $i => $val) {
|
||||
if ($filename_list[$i]) {
|
||||
$this->atleastonefile = 1;
|
||||
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".$cid_list[$i], LOG_DEBUG);
|
||||
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".(empty($cid_list[$i]) ? '' : $cid_list[$i]), LOG_DEBUG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ class TimeSpent extends CommonObject
|
||||
if (isset($this->status)) {
|
||||
$datas['picto'] .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
||||
@@ -774,7 +774,7 @@ class MyObject extends CommonObject
|
||||
if (isset($this->status)) {
|
||||
$datas['picto'] .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* Copyright (C) 2016-2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2022-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2026 Mathieu Moulin <mathieu@iprospective.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
|
||||
@@ -1033,7 +1034,10 @@ class Reception extends CommonObject
|
||||
$this->db->begin();
|
||||
|
||||
// Stock control
|
||||
if (isModEnabled('stock') && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) {
|
||||
if (isModEnabled('stock') &&
|
||||
((getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION') && $this->statut > self::STATUS_DRAFT) ||
|
||||
(getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION_CLOSE') && $this->statut == self::STATUS_CLOSED))
|
||||
) {
|
||||
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
||||
|
||||
$langs->load("agenda");
|
||||
|
||||
@@ -93,6 +93,8 @@ if ($conf->browser->layout == 'phone') {
|
||||
$MAXCATEG = (empty($conf->global->TAKEPOS_NB_MAXCATEG) ? $maxcategbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXCATEG);
|
||||
$MAXPRODUCT = (empty($conf->global->TAKEPOS_NB_MAXPRODUCT) ? $maxproductbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXPRODUCT);
|
||||
|
||||
$term = empty($_SESSION['takeposterminal']) ? 1 : $_SESSION['takeposterminal'];
|
||||
$socid = getDolGlobalInt('CASHDESK_ID_THIRDPARTY' . $term);
|
||||
/*
|
||||
$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"];
|
||||
$soc = new Societe($db);
|
||||
@@ -329,8 +331,15 @@ function LoadProducts(position, issubcat) {
|
||||
if (maxproduct >= 1) {
|
||||
limit = maxproduct-1;
|
||||
}
|
||||
|
||||
// Get socid
|
||||
let socid = jQuery('#thirdpartyid').val();
|
||||
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
|
||||
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
|
||||
}
|
||||
|
||||
// Only show products for sale (tosell=1)
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + socid + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
|
||||
console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs");
|
||||
console.log(data);
|
||||
while (ishow < maxproduct) {
|
||||
@@ -437,8 +446,15 @@ function MoreProducts(moreorless) {
|
||||
limit = maxproduct-1;
|
||||
}
|
||||
var offset = <?php echo ($MAXPRODUCT - 2); ?> * pageproducts;
|
||||
|
||||
// Get socid
|
||||
let socid = jQuery('#thirdpartyid').val();
|
||||
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
|
||||
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
|
||||
}
|
||||
|
||||
// Only show products for sale (tosell=1)
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + socid + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
|
||||
console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat);
|
||||
|
||||
if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages
|
||||
@@ -662,7 +678,14 @@ function Search2(keyCodeForEnter, moreorless) {
|
||||
pageproducts = 0;
|
||||
jQuery(".wrapper2 .catwatermark").hide();
|
||||
var nbsearchresults = 0;
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
|
||||
|
||||
// Only show products for sale (tosell=1)
|
||||
let socid = jQuery('#thirdpartyid').val();
|
||||
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
|
||||
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
|
||||
}
|
||||
|
||||
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + socid + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
|
||||
for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
|
||||
if (typeof (data[i]) == "undefined") {
|
||||
$("#prowatermark" + i).html("");
|
||||
|
||||
@@ -2767,7 +2767,7 @@ class Ticket extends CommonObject
|
||||
}
|
||||
|
||||
// If public interface is not enable, use link to internal page into mail
|
||||
$url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/view.php', 2)) . '/view.php?track_id='.$object->track_id;
|
||||
$url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 2)) . 'view.php?track_id='.$object->track_id;
|
||||
$message .= '<br>'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : <a href="'.$url_public_ticket.'">'.$object->track_id.'</a><br>';
|
||||
|
||||
// Build final message
|
||||
|
||||
Reference in New Issue
Block a user