mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Fix phan/stan notices (#31271)
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall Fix notices in classes with UnknownObjectMethodCall notices or classes related with these.
This commit is contained in:
parent
7fe28032d1
commit
f70c945931
|
|
@ -2,17 +2,14 @@
|
|||
if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'&token='.newToken().'">';
|
||||
$object->date_ech = $object->periode;
|
||||
$object->periode = $object->date_ech;
|
||||
$reponsesadd = str_split($obj->reponses);
|
||||
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
|
||||
$sql .= " SET reponses = '0".$db->escape($obj->reponses)."'";
|
||||
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0);
|
||||
// $object->periode = dol_get_last_day(year of $object->date_ech - 1m, month or $object->date_ech -1m)
|
||||
//$pice = '<i class="fas fa-briefcase inline-block"></i>';
|
||||
//$typea = ($objp->typea == 'birth') ? $picb : $pice;
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||
$dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt');
|
||||
$object->periode = $newdateperiod;
|
||||
$pice = '<i class="fas fa-briefcase inline-block"></i>';
|
||||
$typea = ($data[$j]->typea == 'birth') ? $picb : $pice;
|
||||
GETPOSTINT("mouvement"),
|
||||
|
|
@ -25,8 +22,6 @@
|
|||
$date_liv = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
|
||||
$newfiletmp = preg_replace('/\.od(s|t)/i', '', $newfile);
|
||||
$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
|
||||
$object->period = dol_time_plus_duree($object->periode, 1, 'm');
|
||||
$object->periode = dol_time_plus_duree($object->periode, 1, 'm');
|
||||
$this->category->childs[] = $this->_cleanObjectDatas($cat);
|
||||
$this->periode = $this->db->jdate($obj->period);
|
||||
$tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
|
||||
|
|
@ -58,12 +53,9 @@
|
|||
if (empty($reyear) || empty($remonth) || empty($reday)) {
|
||||
jQuery("#mouvement").change(function() {
|
||||
preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg);
|
||||
print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert&token='.newToken().'">'.$langs->trans("TransferStock").'</a>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).'</span>';
|
||||
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
|
||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||
print dol_print_date($object->periode, "day");
|
||||
"sme",
|
||||
$action = 'transfert';
|
||||
$cle_rib = strtolower(checkES($rib, $CCC));
|
||||
|
|
@ -97,9 +89,7 @@
|
|||
if ($user->hasRight('stock', 'mouvement', 'creer')) {
|
||||
if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) {
|
||||
if (empty($reyear) || empty($remonth) || empty($reday)) {
|
||||
print '<input type="hidden" name="action" value="addin">';
|
||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
|
||||
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
|
||||
$date = $obj->periode;
|
||||
$datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
|
||||
$datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"));
|
||||
|
|
@ -132,14 +122,12 @@
|
|||
// ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
|
||||
<strong>TaskItem(<em>pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt</em>)</strong></p>
|
||||
if ($action == "transfert") {
|
||||
if ($object->id > 0 && $action == 'addin') {
|
||||
if (GETPOST('reday')) {
|
||||
if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) {
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
|
||||
print '<td class="left" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfMembers").' <span class="opacitymedium">('.$langs->trans("AllTime").')</span></td>';
|
||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Period")."</td><td>".dol_print_date($charge->periode, 'day')."</td></tr>\n";
|
||||
print ajax_combobox("mouvement");
|
||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname,cs.periode", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
|
|
@ -158,7 +146,6 @@
|
|||
- informations,medias,uptodate,reenable,crypted,developpers
|
||||
- ned
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
$permissiontoadd = $user->hasRight('stock', 'mouvement', 'creer');
|
||||
$permissiontodelete = $user->hasRight('stock', 'mouvement', 'creer'); // There is no deletion permission for stock movement as we should never delete
|
||||
$permissiontoread = $user->hasRight('stock', 'mouvement', 'lire');
|
||||
|
|
@ -174,10 +161,10 @@ $usercandelete = $user->hasRight('stock', 'mouvement', 'creer');
|
|||
$usercandelete = (($user->hasRight('stock', 'mouvement', 'supprimer')));
|
||||
$usercanread = $user->hasRight('stock', 'mouvement', 'lire');
|
||||
$usercanread = (($user->hasRight('stock', 'mouvement', 'lire')));
|
||||
$usercanupdatestock = $user->hasRight('stock', 'mouvement', 'creer');
|
||||
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
|
||||
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
|
||||
- New: Add proposals into referer page of thirdparty.
|
||||
AmountIn
|
||||
NEW: ModuleBuilder: Checkin comments begin and end before each actions
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
for /F "tokens=2 delims=," %%i in ('tasklist /FI "IMAGENAME eq php.exe" /FO CSV /NH') do (
|
||||
|
|
|
|||
|
|
@ -9,35 +9,35 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1200+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 680+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 550+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 430+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 420+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 1150+ occurrences
|
||||
// PhanUndeclaredProperty : 850+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 660+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 500+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 420+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 410+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 310+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 270+ occurrences
|
||||
// PhanTypeMismatchProperty : 180+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 140+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 140+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 120+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 75+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 70+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 70+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 65+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 50+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 50+ occurrences
|
||||
// PhanRedefineFunction : 50+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 35+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 35+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 30+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 25+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 15+ occurrences
|
||||
// PhanTypeComparisonFromArray : 15+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanUndeclaredMethod : 15+ occurrences
|
||||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginConstantVariableNull : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 10+ occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 10+ occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 8 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 7 occurrences
|
||||
// PhanParamTooMany : 5 occurrences
|
||||
|
|
@ -152,7 +152,6 @@ return [
|
|||
'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/cashcontrol/cashcontrol_list.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/deplacement/class/deplacement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -337,7 +336,7 @@ return [
|
|||
'htdocs/core/extrafieldsinimport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
@ -396,8 +395,7 @@ return [
|
|||
'htdocs/core/menus/standard/eldy_menu.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/barcode/doc/phpbarcode.modules.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -412,7 +410,6 @@ return [
|
|||
'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/dons/modules_don.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -432,7 +429,7 @@ return [
|
|||
'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/member/doc/doc_generic_member_odt.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/core/modules/member/doc/pdf_standard_member.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/modules/member/modules_cards.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/modules/member/modules_cards.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -616,7 +613,6 @@ return [
|
|||
'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/paiement/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/product/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/ftp/admin/ftpclient.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
|
|
@ -681,13 +677,13 @@ return [
|
|||
'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mrp/class/api_mos.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/mrp/class/mo.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/mrp/class/mo.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/mrp/lib/mrp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/mrp/lib/mrp_mo.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/mrp/tpl/originproductline.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -700,25 +696,20 @@ return [
|
|||
'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/class/api_partnerships.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnership_type.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/partnership/core/modules/partnership/modules_partnership.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/lib/partnership.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/partnership/partnership_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/partnership_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/printing/admin/printing.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/printing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/printing/lib/printing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/admin/product_lot.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/ajax/product_lot.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/card.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
|
|
@ -768,7 +759,7 @@ return [
|
|||
'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/projet/activity/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/activity/perday.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -799,27 +790,27 @@ return [
|
|||
'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'],
|
||||
'htdocs/public/company/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/bookcal/index.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/company/new.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/demo/index.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/donations/donateurs_code.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/emailing/mailing-read.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/eventorganization/attendee_new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/eventorganization/subscriptionok.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/members/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/eventorganization/attendee_new.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/eventorganization/subscriptionok.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/members/new.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/members/public_card.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/members/public_list.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/onlinesign/newonlinesign.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/public/partnership/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'],
|
||||
'htdocs/public/partnership/new.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/project/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/project/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/suggestbooth.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/project/new.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/suggestbooth.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -850,7 +841,7 @@ return [
|
|||
'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2023 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2023 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -465,8 +465,10 @@ class BookKeeping extends CommonObject
|
|||
|
||||
// Call triggers
|
||||
if (! $error && ! $notrigger) {
|
||||
$result=$this->call_trigger('BOOKKEEPING_CREATE', $user);
|
||||
if ($result < 0) $error++;
|
||||
$result = $this->call_trigger('BOOKKEEPING_CREATE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
|
|
@ -714,8 +716,10 @@ class BookKeeping extends CommonObject
|
|||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element.$mode);
|
||||
// Call triggers
|
||||
if (! $notrigger) {
|
||||
$result=$this->call_trigger('BOOKKEEPING_CREATE', $user);
|
||||
if ($result < 0) $error++;
|
||||
$result = $this->call_trigger('BOOKKEEPING_CREATE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1480,8 +1484,10 @@ class BookKeeping extends CommonObject
|
|||
|
||||
// Call triggers
|
||||
if (! $error && ! $notrigger) {
|
||||
$result=$this->call_trigger('BOOKKEEPING_MODIFY', $user);
|
||||
if ($result < 0) $error++;
|
||||
$result = $this->call_trigger('BOOKKEEPING_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
|
|
@ -1571,8 +1577,10 @@ class BookKeeping extends CommonObject
|
|||
|
||||
// Call triggers
|
||||
if (! $error && ! $notrigger) {
|
||||
$result=$this->call_trigger('BOOKKEEPING_DELETE', $user);
|
||||
if ($result < 0) $error++;
|
||||
$result = $this->call_trigger('BOOKKEEPING_DELETE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
@ -2337,7 +2345,7 @@ class BookKeeping extends CommonObject
|
|||
global $conf;
|
||||
|
||||
$alias = trim($alias);
|
||||
$alias = !empty($alias) && strpos($alias, '.') < 0 ? $alias . "." : $alias;
|
||||
$alias = !empty($alias) && strpos($alias, '.') === false ? $alias . "." : $alias;
|
||||
|
||||
if (!isset(self::$can_modify_bookkeeping_sql_cached[$alias]) || $force) {
|
||||
$result = $this->loadFiscalPeriods($force, 'active');
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ if ($mode == 'searchkey') {
|
|||
$nbempty++;
|
||||
}
|
||||
|
||||
if ($action == 'search' && ($nbempty > 999)) { // 999 to disable this
|
||||
if ($action == 'search' && ($nbempty > 999)) { // 999 to disable this @phpstan-ignore-line
|
||||
setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings');
|
||||
} else {
|
||||
// Now search into translation array
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ print '<span class="opacitymedium">'.$langs->trans("WebhookSetupPage", $langs->t
|
|||
|
||||
|
||||
if ($action == 'edit') {
|
||||
if ($useFormSetup && (float) DOL_VERSION >= 15) {
|
||||
if ($useFormSetup && (float) DOL_VERSION >= 15) { // @phpstan-ignore-line
|
||||
print $formSetup->generateOutput(true);
|
||||
} else {
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
|
@ -257,7 +257,7 @@ if ($action == 'edit') {
|
|||
|
||||
print '<br>';
|
||||
} else {
|
||||
if ($useFormSetup && (float) DOL_VERSION >= 15) {
|
||||
if ($useFormSetup && (float) DOL_VERSION >= 15) { // @phpstan-ignore-line
|
||||
if (!empty($formSetup->items)) {
|
||||
print $formSetup->generateOutput();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -85,7 +86,7 @@ print dol_get_fiche_end();
|
|||
|
||||
|
||||
// Buttons
|
||||
if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl.
|
||||
if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl. @phpstan-ignore-line
|
||||
if ($action != 'create' && $action != 'edit') {
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a>';
|
||||
|
|
|
|||
|
|
@ -2741,15 +2741,15 @@ class Commande extends CommonOrder
|
|||
/**
|
||||
* Return list of orders (eventuelly filtered on a user) into an array
|
||||
*
|
||||
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||
* @param int $draft 0=not draft, 1=draft
|
||||
* @param User $excluser Object user to exclude
|
||||
* @param int $socid Id third party
|
||||
* @param int $limit For pagination
|
||||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
* @param string $sortorder Sort order
|
||||
* @return int|array -1 if KO, array with result if OK
|
||||
* @param int<0,1> $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||
* @param int<0,1> $draft 0=not draft, 1=draft
|
||||
* @param ?User $excluser Object user to exclude
|
||||
* @param int $socid Id third party
|
||||
* @param int $limit For pagination
|
||||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
* @param string $sortorder Sort order
|
||||
* @return array<int,string>|array<int,array{id:int,ref:string,name:string}>|int<-1,-1> -1 if KO, array with result if OK
|
||||
*/
|
||||
public function liste_array($shortlist = 0, $draft = 0, $excluser = null, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4637,8 +4637,8 @@ class Facture extends CommonInvoice
|
|||
* Return next reference of customer invoice not already used (or last reference)
|
||||
* according to numbering module defined into constant FACTURE_ADDON
|
||||
*
|
||||
* @param Societe $soc object company
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @param Societe $soc object company
|
||||
* @param 'next'|'last' $mode 'next' for next value or 'last' for last value
|
||||
* @return string free ref or last ref
|
||||
*/
|
||||
public function getNextNumRef($soc, $mode = 'next')
|
||||
|
|
@ -4781,15 +4781,15 @@ class Facture extends CommonInvoice
|
|||
/**
|
||||
* Return list of invoices (eventually filtered on a user) into an array
|
||||
*
|
||||
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||
* @param int $draft 0=not draft, 1=draft
|
||||
* @param User $excluser Object user to exclude
|
||||
* @param int $socid Id third party
|
||||
* @param int $limit For pagination
|
||||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
* @param string $sortorder Sort order
|
||||
* @return array|int -1 if KO, array with result if OK
|
||||
* @param int<0,1> $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||
* @param int $draft 0=not draft, 1=draft
|
||||
* @param ?User $excluser Object user to exclude
|
||||
* @param int $socid Id third party
|
||||
* @param int $limit For pagination
|
||||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
* @param string $sortorder Sort order
|
||||
* @return array<int,string>|array<array{id:int,ref:string,name:string}>|int<-1,-1> Array with result if OK, -1 if KO,
|
||||
*/
|
||||
public function liste_array($shortlist = 0, $draft = 0, $excluser = null, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC')
|
||||
{
|
||||
|
|
@ -4863,8 +4863,8 @@ class Facture extends CommonInvoice
|
|||
* Invoices matching the following rules are returned:
|
||||
* (Status validated or abandoned for a reason 'other') + not paid + no payment at all + not already replaced
|
||||
*
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* @param int $socid Id thirdparty
|
||||
* @return int<-1,-1>|array<int,array{id:int,ref:string,status:int,paid:int<0,1>,alreadypaid:int<0,1>}> Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
*/
|
||||
public function list_replacable_invoices($socid = 0)
|
||||
{
|
||||
|
|
@ -4917,8 +4917,9 @@ class Facture extends CommonInvoice
|
|||
* Invoices matching the following rules are returned:
|
||||
* (validated + payment on process) or classified (paid completely or paid partiely) + not already replaced + not already a credit note
|
||||
*
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array|int Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array<int,array{ref:string,status:int,type:int,paye:int<0,1>,paymentornot:int<0,1>}>|int<-1,-1>
|
||||
* Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
*/
|
||||
public function list_qualified_avoir_invoices($socid = 0)
|
||||
{
|
||||
|
|
@ -5366,7 +5367,7 @@ class Facture extends CommonInvoice
|
|||
/**
|
||||
* Returns an array containing the previous situations as Facture objects
|
||||
*
|
||||
* @return mixed -1 if error, array of previous situations
|
||||
* @return Facture[]|int<-1,-1> -1 if error, array of previous situations
|
||||
*/
|
||||
public function get_prev_sits()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6713,22 +6713,22 @@ class Form
|
|||
* Output an HTML select vat rate.
|
||||
* The name of this function should be selectVat. We keep bad name for compatibility purpose.
|
||||
*
|
||||
* @param string $htmlname Name of HTML select field
|
||||
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
|
||||
* @param Societe $societe_vendeuse Thirdparty seller
|
||||
* @param Societe $societe_acheteuse Thirdparty buyer
|
||||
* @param int $idprod Id product. O if unknown of NA.
|
||||
* @param int $info_bits Miscellaneous information on line (1 for NPR)
|
||||
* @param int|string $type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
|
||||
* If seller not subject to VAT, default VAT=0. End of rule.
|
||||
* If (seller country==buyer country), then default VAT=product's VAT. End of rule.
|
||||
* If (seller and buyer in EU) and sold product = new means of transportation (car, boat, airplane), default VAT =0 (VAT must be paid by the buyer to his country's tax office and not the seller). End of rule.
|
||||
* If (seller and buyer in EU) and buyer=private person, then default VAT=VAT of sold product. End of rule.
|
||||
* If (seller and buyer in EU) and buyer=company then default VAT =0. End of rule.
|
||||
* Else, default proposed VAT==0. End of rule.
|
||||
* @param bool $options_only Return HTML options lines only (for ajax treatment)
|
||||
* @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
|
||||
* @param int $type_vat 0=All type, 1=VAT rate sale, 2=VAT rate purchase
|
||||
* @param string $htmlname Name of HTML select field
|
||||
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
|
||||
* @param ?Societe $societe_vendeuse Thirdparty seller
|
||||
* @param ?Societe $societe_acheteuse Thirdparty buyer
|
||||
* @param int $idprod Id product. O if unknown of NA.
|
||||
* @param int $info_bits Miscellaneous information on line (1 for NPR)
|
||||
* @param int<0,1>|'' $type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
|
||||
* If seller not subject to VAT, default VAT=0. End of rule.
|
||||
* If (seller country==buyer country), then default VAT=product's VAT. End of rule.
|
||||
* If (seller and buyer in EU) and sold product = new means of transportation (car, boat, airplane), default VAT =0 (VAT must be paid by the buyer to his country's tax office and not the seller). End of rule.
|
||||
* If (seller and buyer in EU) and buyer=private person, then default VAT=VAT of sold product. End of rule.
|
||||
* If (seller and buyer in EU) and buyer=company then default VAT =0. End of rule.
|
||||
* Else, default proposed VAT==0. End of rule.
|
||||
* @param bool $options_only Return HTML options lines only (for ajax treatment)
|
||||
* @param int<-1,1> $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
|
||||
* @param int<0,2> $type_vat 0=All type, 1=VAT rate sale, 2=VAT rate purchase
|
||||
* @return string
|
||||
*/
|
||||
public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = null, $societe_acheteuse = null, $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0, $type_vat = 0)
|
||||
|
|
|
|||
|
|
@ -12452,7 +12452,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
|
|||
|
||||
$out = '';
|
||||
|
||||
if (isset($params["areDropdownButtons"]) && $params["areDropdownButtons"] === false) {
|
||||
if (array_key_exists('areDropdownButtons', $params) && $params["areDropdownButtons"] === false) { // @phan-suppress-current-line PhanTypeInvalidDimOffset
|
||||
foreach ($url as $button) {
|
||||
if (!empty($button['lang'])) {
|
||||
$langs->load($button['lang']);
|
||||
|
|
@ -12463,7 +12463,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
|
|||
$tmpUrl = DOL_URL_ROOT.$button['url'].(empty($params['backtopage']) ? '' : '&backtopage='.urlencode($params['backtopage']));
|
||||
$id = $button['id'] ?? '';
|
||||
$userRight = $button['perm'] ?? 1;
|
||||
$button['params'] = $button['params'] ?? [];
|
||||
$button['params'] = $button['params'] ?? []; // @phan-suppress-current-line PhanPluginDuplicateExpressionAssignmentOperation
|
||||
|
||||
$out .= dolGetButtonAction($label, $text, $actionType, $tmpUrl, $id, $userRight, $button['params']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
if ($pathoffile) { // Mostly for external modules
|
||||
$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb
|
||||
|
||||
if ((float) DOL_VERSION >= 6.0) {
|
||||
if ((float) DOL_VERSION >= 6.0) { // @phpstan-ignore-line
|
||||
@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
|
||||
|
||||
$content = dolMd2Html(
|
||||
|
|
@ -914,7 +914,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
if ($filefound) { // Mostly for external modules
|
||||
$content = file_get_contents($pathoffile);
|
||||
|
||||
if ((float) DOL_VERSION >= 6.0) {
|
||||
if ((float) DOL_VERSION >= 6.0) { // @phpstan-ignore-line
|
||||
@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
|
||||
|
||||
$content = dolMd2Html($content, 'parsedown', array('doc/' => dol_buildpath(strtolower($this->name).'/doc/', 1)));
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -37,9 +38,9 @@ abstract class ModeleAction extends CommonDocGenerator
|
|||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -709,9 +709,9 @@ class pdf_standard_asset extends ModelePDFAsset
|
|||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -39,9 +40,9 @@ abstract class ModeleDon extends CommonDocGenerator
|
|||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ class ModelePDFCards
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ $result = restrictedArea($user, 'loan', $id, '', '');
|
|||
* View
|
||||
*/
|
||||
|
||||
$morehtmlright = '';
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("Loan").' - '.$langs->trans("Info");
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ if ($id > 0) {
|
|||
}
|
||||
|
||||
$permissionnote = $user->hasRight('loan', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
$morehtmlright = '';
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ print dol_get_fiche_end();
|
|||
|
||||
|
||||
// Buttons
|
||||
if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl.
|
||||
if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl. @phpstan-ignore-line
|
||||
if ($action != 'create' && $action != 'edit') {
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a>';
|
||||
|
|
|
|||
|
|
@ -362,12 +362,12 @@ class ActionsMyModule extends CommonHookActions
|
|||
$parameters['head'][$counter][2] = 'mymoduleemails';
|
||||
$counter++;
|
||||
}
|
||||
if ($counter > 0 && (int) DOL_VERSION < 14) {
|
||||
if ($counter > 0 && (int) DOL_VERSION < 14) { // @phpstan-ignore-line
|
||||
$this->results = $parameters['head'];
|
||||
// return 1 to replace standard code
|
||||
return 1;
|
||||
} else {
|
||||
// From V14 onwards, $parameters['head'] is modifiable by referende
|
||||
// From V14 onwards, $parameters['head'] is modifiable by reference
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ class Mo extends CommonObject
|
|||
$moline->role = 'toproduce';
|
||||
}
|
||||
} else {
|
||||
$bom = null;
|
||||
if ($this->mrptype == 1) {
|
||||
$moline->role = 'toconsume';
|
||||
} else {
|
||||
|
|
@ -773,7 +774,7 @@ class Mo extends CommonObject
|
|||
$this->errors = $moline->errors;
|
||||
}
|
||||
|
||||
if ($this->fk_bom > 0) { // If a BOM is defined, we know what to consume.
|
||||
if ($this->fk_bom > 0 && is_object($bom)) { // If a BOM is defined, we know what to consume.
|
||||
if ($bom->id > 0) {
|
||||
// Lines to consume
|
||||
if (!$error) {
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ if (empty($reshook)) {
|
|||
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once'
|
||||
|
||||
if ($action == 'set_thirdparty' && $permissiontoadd) {
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname);
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
|
||||
}
|
||||
if ($action == 'classin' && $permissiontoadd) {
|
||||
$object->setProject(GETPOSTINT('projectid'));
|
||||
|
|
@ -665,7 +665,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
if (!empty($arrayfields['e.ref']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone left">';
|
||||
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200');
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth200');
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['m.fk_user_author']['checked'])) {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ if (empty($reshook)) {
|
|||
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once'
|
||||
|
||||
if ($action == 'set_thirdparty' && $permissiontoadd) {
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname);
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
|
||||
}
|
||||
if ($action == 'classin' && $permissiontoadd) {
|
||||
$object->setProject(GETPOSTINT('projectid'));
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force array<CommonObject> $linkedObjectBlock';
|
||||
$object = $GLOBALS['object'];
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
@ -45,8 +46,9 @@ if ($object->element == 'mo') {
|
|||
$mo_static = new Mo($db);
|
||||
$res = $mo_static->fetch($object->id);
|
||||
$TMoChilds = $mo_static->getMoChilds();
|
||||
'@phan-var-force Mo[] $TMoChilds';
|
||||
|
||||
$hookmanager->initHooks('LinesLinkedObjectBlock');
|
||||
$hookmanager->initHooks(array('LinesLinkedObjectBlock'));
|
||||
$parameters = array('TMoChilds' => $TMoChilds);
|
||||
$reshook = $hookmanager->executeHooks('LinesLinkedObjectBlock', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
|
|
@ -90,7 +92,7 @@ if ($object->element == 'mo') {
|
|||
}
|
||||
} else {
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
|
||||
'@phan-var-force array<CommonObject> $linkedObjectBlock';
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,13 @@ class Partnership extends CommonObject
|
|||
*/
|
||||
public $picto = 'partnership';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
|
||||
|
||||
|
|
@ -119,26 +125,89 @@ class Partnership extends CommonObject
|
|||
'ip' => array('type' => 'ip', 'label' => 'IPOfApplicant', 'enabled' => 1, 'position' => 74, 'notnull' => 0, 'visible' => -2,),
|
||||
'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 2, 'default' => '0', 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'Approved', '3' => 'Refused', '9' => 'Terminated'),),
|
||||
);
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rowid;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $entity;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $note_public;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $note_private;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $last_main_doc;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $import_key;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $model_pdf;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $date_partnership_start;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $date_partnership_end;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $url_to_check;
|
||||
/**
|
||||
* @var int|float
|
||||
*/
|
||||
public $count_last_url_check_error;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $last_check_backlink;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reason_decline_or_cancel;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_soc;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_member;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ip;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
@ -422,9 +491,9 @@ class Partnership extends CommonObject
|
|||
* @param string $sortfield Sort field
|
||||
* @param int $limit Limit
|
||||
* @param int $offset Offset page
|
||||
* @param string|array $filter Filter USF.
|
||||
* @param string $filtermode Filter mode (AND or OR)
|
||||
* @return array|int int <0 if KO, array of pages if OK
|
||||
* @param string|array<string,mixed> $filter Filter USF.
|
||||
* @param 'AND'|'OR' $filtermode Filter mode (AND or OR)
|
||||
* @return self[]|int int <0 if KO, array of pages if OK
|
||||
*/
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND')
|
||||
{
|
||||
|
|
@ -1177,7 +1246,7 @@ class Partnership extends CommonObject
|
|||
/**
|
||||
* Create an array of lines
|
||||
*
|
||||
* @return array|int array of lines if OK, <0 if KO
|
||||
* @return PartnershipLine[]|int array of lines if OK, <0 if KO
|
||||
*/
|
||||
public function getLinesArray()
|
||||
{
|
||||
|
|
@ -1232,6 +1301,7 @@ class Partnership extends CommonObject
|
|||
|
||||
if (class_exists($classname)) {
|
||||
$obj = new $classname();
|
||||
'@phan-var-force ModeleNumRefPartnership $obj';
|
||||
$numref = $obj->getNextValue($this);
|
||||
|
||||
if ($numref != '' && $numref != '-1') {
|
||||
|
|
@ -1256,10 +1326,10 @@ class Partnership extends CommonObject
|
|||
*
|
||||
* @param string $modele Force template to use ('' to not force)
|
||||
* @param Translate $outputlangs object lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param null|array $moreparams Array to provide more information
|
||||
* @param int<0,1> $hidedetails Hide details of lines
|
||||
* @param int<0,1> $hidedesc Hide description
|
||||
* @param int<0,1> $hideref Hide ref
|
||||
* @param ?array<string,mixed> $moreparams Array to provide more information
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ class PartnershipType extends CommonObject
|
|||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $active;
|
||||
|
||||
|
||||
|
|
@ -122,9 +125,9 @@ class PartnershipType extends CommonObject
|
|||
/**
|
||||
* Create object into database
|
||||
*
|
||||
* @param User $user User that creates
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, Id of created object if OK
|
||||
* @param User $user User that creates
|
||||
* @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function create(User $user, $notrigger = 0)
|
||||
{
|
||||
|
|
@ -154,8 +157,8 @@ class PartnershipType extends CommonObject
|
|||
* @param int $offset Offset
|
||||
* @param string $filter Filter as an Universal Search string.
|
||||
* Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')'
|
||||
* @param string $filtermode No more used
|
||||
* @return array|int int <0 if KO, array of pages if OK
|
||||
* @param 'AND'|'OR' $filtermode No more used
|
||||
* @return self[]|int int <0 if KO, array of pages if OK
|
||||
*/
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,11 +38,23 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
|||
*/
|
||||
class PartnershipUtils
|
||||
{
|
||||
/**
|
||||
* @var DoliDB
|
||||
*/
|
||||
public $db; //!< To store db handler
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $error; //!< To return error code (or message)
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $errors = array(); //!< To return several error codes (or messages)
|
||||
|
||||
public $output; // To store output of some cron methods
|
||||
/**
|
||||
* @var string To store output of some cron methods
|
||||
*/
|
||||
public $output;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -107,6 +119,7 @@ class PartnershipUtils
|
|||
$sql .= $this->db->order('d.rowid', 'ASC');
|
||||
// Limit is managed into loop later
|
||||
|
||||
$numofexpiredmembers = 0;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$numofexpiredmembers = $this->db->num_rows($resql);
|
||||
|
|
@ -326,6 +339,7 @@ class PartnershipUtils
|
|||
$sql .= $this->db->order('p.rowid', 'ASC');
|
||||
// Limit is managed into loop later
|
||||
|
||||
$numofexpiredmembers = 0;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$numofexpiredmembers = $this->db->num_rows($resql);
|
||||
|
|
@ -541,6 +555,7 @@ class PartnershipUtils
|
|||
|
||||
for ($i = 0; $i < $hrefs->length; $i++) {
|
||||
$href = $hrefs->item($i);
|
||||
'@phan-var-force DOMElement $href';
|
||||
$url = $href->getAttribute('href');
|
||||
$url = filter_var($url, FILTER_SANITIZE_URL);
|
||||
if (!(!filter_var($url, FILTER_VALIDATE_URL))) {
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
|
|||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string|0 Next value if OK, 0 if KO
|
||||
* @param Partnership $object Object we need next value for
|
||||
* @return string|int<-1,0> Next value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ class mod_partnership_standard extends ModeleNumRefPartnership
|
|||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string|-1 Next value if OK, -1 if KO
|
||||
* @param Partnership $object Object we need next value for
|
||||
* @return string|int<-1,0> Next value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -42,9 +43,9 @@ abstract class ModelePDFPartnership extends CommonDocGenerator
|
|||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
@ -68,5 +69,11 @@ abstract class ModelePDFPartnership extends CommonDocGenerator
|
|||
*/
|
||||
abstract class ModeleNumRefPartnership extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Partnership $object Object we need next value for
|
||||
* @return string|int<-1,0> Next value if OK, 0 if KO
|
||||
*/
|
||||
abstract public function getNextValue($object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 NextGestion <contact@nextgestion.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -238,7 +239,7 @@ if (empty($reshook)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
if ($action == 'set_thirdparty' && $permissiontoadd) {
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname);
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
|
||||
}
|
||||
if ($action == 'classin' && $permissiontoadd) {
|
||||
$object->setProject(GETPOSTINT('projectid'));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -69,6 +70,7 @@ if ($action == 'setconst' && $user->admin) {
|
|||
$error = 0;
|
||||
$db->begin();
|
||||
foreach ($_POST['setupdriver'] as $setupconst) {
|
||||
'@phan-var-force array<string,string> $setupconst';
|
||||
//print '<pre>'.print_r($setupconst, true).'</pre>';
|
||||
$result = dolibarr_set_const($db, $setupconst['varname'], $setupconst['value'], 'chaine', 0, '', $conf->entity);
|
||||
if (!($result > 0)) {
|
||||
|
|
@ -334,6 +336,7 @@ if ($mode == 'test' && $user->admin) {
|
|||
require_once $classfile;
|
||||
$classname = 'printing_'.$driver;
|
||||
$printer = new $classname($db);
|
||||
'@phan-var-force PrintingDriver $printer';
|
||||
$langs->load($driver);
|
||||
$langs->load('printing');
|
||||
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
require_once $dir . '/' . $file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFProductBatch $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -460,7 +461,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Lionel Vessiller <lvessiller@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,7 +61,7 @@ $rows = array();
|
|||
|
||||
if ($action == 'search' && $batch != '' && $permissiontoread) {
|
||||
$productLot = new Productlot($db);
|
||||
$result = $productLot->fetch('', $productId, $batch);
|
||||
$result = $productLot->fetch(0, $productId, $batch);
|
||||
|
||||
if ($result > 0 && $productLot->id > 0) {
|
||||
$rows[] = array(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -34,27 +35,69 @@ class ActionsCardProduct
|
|||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $dirmodule;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $targetmodule;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $canvas;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $card;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $name;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $definition;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $description;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $price_base_type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $accountancy_code_sell;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $accountancy_code_buy;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $fieldListName;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $next_prev_filter;
|
||||
|
||||
//! Object container
|
||||
/**
|
||||
* @var Product Object container
|
||||
*/
|
||||
public $object;
|
||||
|
||||
//! Template container
|
||||
/**
|
||||
* @var array<string,mixed> Template container
|
||||
*/
|
||||
public $tpl = array();
|
||||
|
||||
// List of fields for action=list
|
||||
/**
|
||||
* array<array{id:int,name:string,alias:string,title:string,align:string,sort:string,search:string,visible:int<-2,5>,enabled:int<0,1>,order:int}> List of fields for action=list
|
||||
*/
|
||||
public $field_list = array();
|
||||
|
||||
/**
|
||||
|
|
@ -96,8 +139,8 @@ class ActionsCardProduct
|
|||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
*
|
||||
* @param string $action Type of action
|
||||
* @param integer $id Id of object
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id of object
|
||||
* @param string $ref Ref of object
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -107,6 +150,9 @@ class ActionsCardProduct
|
|||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formproduct;
|
||||
|
||||
'@phan-var-force Form $form';
|
||||
'@phan-var-force FormProduct $formproduct';
|
||||
|
||||
$tmpobject = new Product($this->db);
|
||||
if (!empty($id) || !empty($ref)) {
|
||||
$tmpobject->fetch($id, $ref);
|
||||
|
|
@ -147,7 +193,7 @@ class ActionsCardProduct
|
|||
$this->tpl['price_base_type'] = $form->selectPriceBaseType($this->price_base_type, "price_base_type");
|
||||
|
||||
// VAT
|
||||
$this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, '');
|
||||
$this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, null);
|
||||
}
|
||||
|
||||
if ($action == 'view') {
|
||||
|
|
@ -290,7 +336,6 @@ class ActionsCardProduct
|
|||
$fieldlist["visible"] = $obj->visible;
|
||||
$fieldlist["enabled"] = verifCond($obj->enabled);
|
||||
$fieldlist["order"] = $obj->rang;
|
||||
|
||||
array_push($this->field_list, $fieldlist);
|
||||
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ $error = 0;
|
|||
$errors = array();
|
||||
|
||||
$refalreadyexists = 0;
|
||||
$formbarcode = null;
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOSTINT('id');
|
||||
|
|
@ -1057,8 +1058,11 @@ if (empty($reshook)) {
|
|||
|
||||
// Add product into object (when PRODUCT_ADD_FORM_ADD_TO is set)
|
||||
if ($object->id > 0 && $action == 'addin') { // Test on permission not required here. it is done later according to object.
|
||||
$thirpdartyid = 0;
|
||||
$thirdpartyid = 0;
|
||||
$permissiontoaddline = false;
|
||||
$propal = null;
|
||||
$facture = null;
|
||||
$commande = null;
|
||||
|
||||
// Get object and test permission
|
||||
if (GETPOST('propalid') > 0) {
|
||||
|
|
@ -1068,7 +1072,7 @@ if (empty($reshook)) {
|
|||
dol_print_error($db, $propal->error);
|
||||
exit;
|
||||
}
|
||||
$thirpdartyid = $propal->socid;
|
||||
$thirdpartyid = $propal->socid;
|
||||
$permissiontoaddline = $user->hasRight('propal', 'creer');
|
||||
} elseif (GETPOST('commandeid') > 0) {
|
||||
$commande = new Commande($db);
|
||||
|
|
@ -1077,7 +1081,7 @@ if (empty($reshook)) {
|
|||
dol_print_error($db, $commande->error);
|
||||
exit;
|
||||
}
|
||||
$thirpdartyid = $commande->socid;
|
||||
$thirdpartyid = $commande->socid;
|
||||
$permissiontoaddline = $user->hasRight('commande', 'creer');
|
||||
} elseif (GETPOST('factureid') > 0) {
|
||||
$facture = new Facture($db);
|
||||
|
|
@ -1086,13 +1090,13 @@ if (empty($reshook)) {
|
|||
dol_print_error($db, $facture->error);
|
||||
exit;
|
||||
}
|
||||
$thirpdartyid = $facture->socid;
|
||||
$thirdpartyid = $facture->socid;
|
||||
$permissiontoaddline = $user->hasRight('facture', 'creer');
|
||||
}
|
||||
|
||||
if ($thirpdartyid > 0) {
|
||||
if ($thirdpartyid > 0) {
|
||||
$soc = new Societe($db);
|
||||
$result = $soc->fetch($thirpdartyid);
|
||||
$result = $soc->fetch($thirdpartyid);
|
||||
if ($result <= 0) {
|
||||
dol_print_error($db, $soc->error);
|
||||
exit;
|
||||
|
|
@ -1148,7 +1152,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (GETPOST('propalid') > 0 && $permissiontoaddline) {
|
||||
if (GETPOST('propalid') > 0 && $permissiontoaddline && is_object($propal)) {
|
||||
// Define cost price for margin calculation
|
||||
$buyprice = 0;
|
||||
if (($result = $propal->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||
|
|
@ -1188,7 +1192,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors');
|
||||
} elseif (GETPOST('commandeid') > 0 && $permissiontoaddline) {
|
||||
} elseif (GETPOST('commandeid') > 0 && $permissiontoaddline && is_object($commande)) {
|
||||
// Define cost price for margin calculation
|
||||
$buyprice = 0;
|
||||
if (($result = $commande->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||
|
|
@ -1207,8 +1211,8 @@ if (empty($reshook)) {
|
|||
$localtax2_tx, // localtax2
|
||||
$object->id,
|
||||
price2num(GETPOST('remise_percent'), '', 2),
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
0,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
'',
|
||||
|
|
@ -1217,10 +1221,10 @@ if (empty($reshook)) {
|
|||
-1,
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
0,
|
||||
$buyprice,
|
||||
'',
|
||||
0,
|
||||
array(),
|
||||
$object->fk_unit
|
||||
);
|
||||
|
||||
|
|
@ -1230,7 +1234,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors');
|
||||
} elseif (GETPOST('factureid') > 0 && $permissiontoaddline) {
|
||||
} elseif (GETPOST('factureid') > 0 && $permissiontoaddline && is_object($facture)) {
|
||||
// Define cost price for margin calculation
|
||||
$buyprice = 0;
|
||||
if (($result = $facture->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||
|
|
@ -1251,9 +1255,9 @@ if (empty($reshook)) {
|
|||
price2num(GETPOST('remise_percent'), '', 2),
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
Facture::TYPE_STANDARD,
|
||||
|
|
@ -1262,12 +1266,12 @@ if (empty($reshook)) {
|
|||
'',
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
0,
|
||||
$buyprice,
|
||||
'',
|
||||
0,
|
||||
array(),
|
||||
100,
|
||||
'',
|
||||
0,
|
||||
$object->fk_unit
|
||||
);
|
||||
|
||||
|
|
@ -1328,6 +1332,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-card');
|
|||
|
||||
// Load object modBarCodeProduct
|
||||
$res = 0;
|
||||
$modBarCodeProduct = null;
|
||||
if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
||||
$module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'));
|
||||
$dirbarcode = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||
|
|
@ -1339,6 +1344,7 @@ if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'))
|
|||
}
|
||||
if ($res > 0) {
|
||||
$modBarCodeProduct = new $module();
|
||||
'@phan-var-force ModeleBarCode $modBarCodeProduct';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1522,7 +1528,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$showbarcode = 0;
|
||||
}
|
||||
|
||||
if ($showbarcode) {
|
||||
if ($showbarcode && is_object($modBarCodeProduct)) {
|
||||
print '<tr><td>'.$langs->trans('BarcodeType').'</td><td>';
|
||||
if (GETPOSTISSET('fk_barcode_type')) {
|
||||
$fk_barcode_type = GETPOST('fk_barcode_type') ? GETPOST('fk_barcode_type') : 0;
|
||||
|
|
@ -1740,7 +1746,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 3);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
|
@ -1802,7 +1808,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_sell_intra
|
||||
|
|
@ -1814,7 +1820,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
@ -1826,7 +1832,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_buy
|
||||
|
|
@ -1837,7 +1843,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : getDolGlobalString("ACCOUNTING_SERVICE_BUY_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_buy_intra
|
||||
|
|
@ -1849,7 +1855,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
@ -1861,7 +1867,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
} else {
|
||||
$accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT"));
|
||||
}
|
||||
print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1);
|
||||
print '</td></tr>';
|
||||
} else {// For external software
|
||||
if (!empty($accountancy_code_sell)) {
|
||||
|
|
@ -2367,7 +2373,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$arrayselected[] = $cat;
|
||||
}
|
||||
}
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
|
@ -2392,41 +2398,41 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
// Accountancy_code_sell
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell') : $object->accountancy_code_sell), 'accountancy_code_sell', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell') : $object->accountancy_code_sell), 'accountancy_code_sell', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_sell_intra
|
||||
if ($mysoc->isInEEC()) {
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra') : $object->accountancy_code_sell_intra), 'accountancy_code_sell_intra', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra') : $object->accountancy_code_sell_intra), 'accountancy_code_sell_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Accountancy_code_sell_export
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export') : $object->accountancy_code_sell_export), 'accountancy_code_sell_export', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export') : $object->accountancy_code_sell_export), 'accountancy_code_sell_export', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_buy
|
||||
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy') ? GETPOST('accountancy_code_buy') : $object->accountancy_code_buy), 'accountancy_code_buy', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy') ? GETPOST('accountancy_code_buy') : $object->accountancy_code_buy), 'accountancy_code_buy', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy_code_buy_intra
|
||||
if ($mysoc->isInEEC()) {
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra') : $object->accountancy_code_buy_intra), 'accountancy_code_buy_intra', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra') : $object->accountancy_code_buy_intra), 'accountancy_code_buy_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Accountancy_code_buy_export
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export') : $object->accountancy_code_buy_export), 'accountancy_code_buy_export', 1, '', 1, 1, 'minwidth150 maxwidth300');
|
||||
print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export') : $object->accountancy_code_buy_export), 'accountancy_code_buy_export', 1, array(), 1, 1, 'minwidth150 maxwidth300');
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
// For external software
|
||||
|
|
@ -2535,7 +2541,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
|
||||
$fk_barcode_type = '';
|
||||
if ($action == 'editbarcodetype') {
|
||||
if ($action == 'editbarcodetype' && is_object($formbarcode)) {
|
||||
print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type');
|
||||
$fk_barcode_type = $object->barcode_type;
|
||||
} else {
|
||||
|
|
@ -2601,7 +2607,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_sell)) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch('', $object->accountancy_code_sell, 1);
|
||||
$accountingaccount->fetch(0, $object->accountancy_code_sell, 1);
|
||||
|
||||
print $accountingaccount->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2618,7 +2624,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_sell_intra)) {
|
||||
$accountingaccount2 = new AccountingAccount($db);
|
||||
$accountingaccount2->fetch('', $object->accountancy_code_sell_intra, 1);
|
||||
$accountingaccount2->fetch(0, $object->accountancy_code_sell_intra, 1);
|
||||
|
||||
print $accountingaccount2->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2635,7 +2641,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_sell_export)) {
|
||||
$accountingaccount3 = new AccountingAccount($db);
|
||||
$accountingaccount3->fetch('', $object->accountancy_code_sell_export, 1);
|
||||
$accountingaccount3->fetch(0, $object->accountancy_code_sell_export, 1);
|
||||
|
||||
print $accountingaccount3->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2651,7 +2657,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_buy)) {
|
||||
$accountingaccount4 = new AccountingAccount($db);
|
||||
$accountingaccount4->fetch('', $object->accountancy_code_buy, 1);
|
||||
$accountingaccount4->fetch(0, $object->accountancy_code_buy, 1);
|
||||
|
||||
print $accountingaccount4->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2668,7 +2674,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_buy_intra)) {
|
||||
$accountingaccount5 = new AccountingAccount($db);
|
||||
$accountingaccount5->fetch('', $object->accountancy_code_buy_intra, 1);
|
||||
$accountingaccount5->fetch(0, $object->accountancy_code_buy_intra, 1);
|
||||
|
||||
print $accountingaccount5->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2685,7 +2691,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
if (isModEnabled('accounting')) {
|
||||
if (!empty($object->accountancy_code_buy_export)) {
|
||||
$accountingaccount6 = new AccountingAccount($db);
|
||||
$accountingaccount6->fetch('', $object->accountancy_code_buy_export, 1);
|
||||
$accountingaccount6->fetch(0, $object->accountancy_code_buy_export, 1);
|
||||
|
||||
print $accountingaccount6->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
|
@ -2930,7 +2936,7 @@ if ($action == 'merge') {
|
|||
'name' => 'product_origin',
|
||||
'label' => $langs->trans('MergeOriginProduct'),
|
||||
'type' => 'other',
|
||||
'value' => $form->select_produits('', 'product_origin', '', 0, 0, 1, 2, '', 1, array(), 0, 1, 0, 'minwidth200', 0, '', null, 1),
|
||||
'value' => $form->select_produits(0, 'product_origin', '', 0, 0, 1, 2, '', 1, array(), 0, 1, 0, 'minwidth200', 0, '', null, 1),
|
||||
)
|
||||
);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("MergeProducts"), $langs->trans("ConfirmMergeProducts"), "confirm_merge", $formquestion, 'no', 1, 250);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -291,7 +292,7 @@ class Products extends DolibarrApi
|
|||
$obj_ret['pagination'] = array(
|
||||
'total' => (int) $total,
|
||||
'page' => $page, //count starts from 0
|
||||
'page_count' => ceil((int) $total/$limit),
|
||||
'page_count' => ceil((int) $total / $limit),
|
||||
'limit' => $limit
|
||||
);
|
||||
}
|
||||
|
|
@ -466,13 +467,23 @@ class Products extends DolibarrApi
|
|||
if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) {
|
||||
$pricemodified = true;
|
||||
} else {
|
||||
if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) $pricemodified = true;
|
||||
if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) {
|
||||
$pricemodified = true;
|
||||
}
|
||||
if ($this->product->multiprices_base_type[$key] == 'TTC') {
|
||||
if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) $pricemodified = true;
|
||||
if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) $pricemodified = true;
|
||||
if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) {
|
||||
$pricemodified = true;
|
||||
}
|
||||
if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) {
|
||||
$pricemodified = true;
|
||||
}
|
||||
} else {
|
||||
if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) $pricemodified = true;
|
||||
if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) $pricemodified = true;
|
||||
if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) {
|
||||
$pricemodified = true;
|
||||
}
|
||||
if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) {
|
||||
$pricemodified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($pricemodified && $result > 0) {
|
||||
|
|
@ -700,12 +711,12 @@ class Products extends DolibarrApi
|
|||
}
|
||||
|
||||
return array(
|
||||
'multiprices'=>$this->product->multiprices,
|
||||
'multiprices_inc_tax'=>$this->product->multiprices_ttc,
|
||||
'multiprices_min'=>$this->product->multiprices_min,
|
||||
'multiprices_min_inc_tax'=>$this->product->multiprices_min_ttc,
|
||||
'multiprices_vat'=>$this->product->multiprices_tva_tx,
|
||||
'multiprices_base_type'=>$this->product->multiprices_base_type,
|
||||
'multiprices' => $this->product->multiprices,
|
||||
'multiprices_inc_tax' => $this->product->multiprices_ttc,
|
||||
'multiprices_min' => $this->product->multiprices_min,
|
||||
'multiprices_min_inc_tax' => $this->product->multiprices_min_ttc,
|
||||
'multiprices_vat' => $this->product->multiprices_tva_tx,
|
||||
'multiprices_base_type' => $this->product->multiprices_base_type,
|
||||
//'multiprices_default_vat_code'=>$this->product->multiprices_default_vat_code
|
||||
);
|
||||
}
|
||||
|
|
@ -791,8 +802,8 @@ class Products extends DolibarrApi
|
|||
}
|
||||
|
||||
return array(
|
||||
'prices_by_qty'=>$this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product
|
||||
'prices_by_qty_list'=>$this->product->prices_by_qty_list[0]
|
||||
'prices_by_qty' => $this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product
|
||||
'prices_by_qty_list' => $this->product->prices_by_qty_list[0]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -267,6 +267,8 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."<br>\n";
|
||||
}
|
||||
|
||||
$thirdparty = null;
|
||||
|
||||
if (!$error) {
|
||||
// Check if attendee already exists (by email and for this event)
|
||||
$filter = array();
|
||||
|
|
@ -327,7 +329,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
}
|
||||
|
||||
$resultconforbooth = -1;
|
||||
$resultconfattendee = -1;
|
||||
|
||||
if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) {
|
||||
$error++;
|
||||
|
|
@ -375,7 +377,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
if (!getDolGlobalString('EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME')) {
|
||||
// Fetch using the field input by end user if we have just created the attendee
|
||||
if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) {
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $emailcompany);
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', $emailcompany);
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with the name + emailcompany, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -386,7 +388,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
// Fetch using the field input by end user if we have just created the attendee
|
||||
if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) {
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email);
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', $email);
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with the name + email, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -398,7 +400,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) {
|
||||
// Try to find thirdparty from the email only
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $emailcompany);
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', $emailcompany);
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with that email only, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -409,7 +411,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) {
|
||||
// Try to find thirdparty from the email only
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $email);
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', $email);
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with that email only, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -420,7 +422,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) {
|
||||
// Try to find thirdparty from the generic mail only
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', $genericcompanyname, '', '', '', '', '', '', '', '', '');
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, $genericcompanyname, '', '', '', '', '', '', '', '', '');
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with that name + email, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -434,7 +436,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
|
||||
if ($resultfetchthirdparty <= 0 && !empty($email)) {
|
||||
// Try to find the thirdparty from the contact
|
||||
$resultfetchcontact = $contact->fetch('', null, '', $email);
|
||||
$resultfetchcontact = $contact->fetch(0, null, '', $email);
|
||||
if ($resultfetchcontact > 0 && $contact->fk_soc > 0) {
|
||||
$thirdparty->fetch($contact->fk_soc);
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -445,7 +447,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
|
||||
if ($resultfetchthirdparty <= 0 && !empty($societe)) {
|
||||
// Try to find thirdparty from the company name only
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', '');
|
||||
$resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', '');
|
||||
if ($resultfetchthirdparty > 0) {
|
||||
// We found a unique result with that name only, so we set the fk_soc of attendee
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
|
|
@ -495,6 +497,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
}
|
||||
$modCodeClient = new $module($db);
|
||||
'@phan-var-force ModeleThirdPartyCode $modCodeClient';
|
||||
|
||||
if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
|
||||
$tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
|
||||
|
|
@ -517,7 +520,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!$error && is_object($thirdparty)) {
|
||||
// If the registration needs a payment
|
||||
if (!empty((float) $project->price_registration)) {
|
||||
$outputlangs = $langs;
|
||||
|
|
@ -535,6 +538,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
$resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION'));
|
||||
}
|
||||
|
||||
$facture = null;
|
||||
// Create the draft invoice for the payment
|
||||
if ($resultprod < 0) {
|
||||
$error++;
|
||||
|
|
@ -596,7 +600,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
$pu_ht = 0;
|
||||
$price_base_type = 'TTC';
|
||||
|
||||
$result = $facture->addline($labelforproduct, $pu_ht, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0, '', $price_base_type, $pu_ttc, 1);
|
||||
$result = $facture->addline($labelforproduct, $pu_ht, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0, 0, $price_base_type, $pu_ttc, 1);
|
||||
if ($result <= 0) {
|
||||
$confattendee->error = $facture->error;
|
||||
$confattendee->errors = $facture->errors;
|
||||
|
|
@ -605,7 +609,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!$error && is_object($facture)) {
|
||||
$db->commit();
|
||||
|
||||
// Registration was recorded and invoice was generated, but payment not yet done.
|
||||
|
|
@ -657,6 +661,9 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
|
||||
$subject = $arraydefaultmessage->topic;
|
||||
$msg = $arraydefaultmessage->content;
|
||||
} else {
|
||||
$subject = null;
|
||||
$msg = null;
|
||||
}
|
||||
|
||||
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ $user->loadDefaultValues();
|
|||
*
|
||||
* @param string $title Title
|
||||
* @param string $head Head array
|
||||
* @param int $disablejs More content into html header
|
||||
* @param int $disablehead More content into html header
|
||||
* @param string[]|string $arrayofjs Array of complementary js files
|
||||
* @param string[]|string $arrayofcss Array of complementary css files
|
||||
* @param int<0,1> $disablejs More content into html header
|
||||
* @param int<0,1> $disablehead More content into html header
|
||||
* @param string[] $arrayofjs Array of complementary js files
|
||||
* @param string[] $arrayofcss Array of complementary css files
|
||||
* @return void
|
||||
*/
|
||||
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
|
||||
|
|
@ -604,13 +604,13 @@ foreach ($listofpartnershipobj as $partnershipobj) {
|
|||
$listofpartnership[$partnershipobj->id] = $partnershipobj->label;
|
||||
}
|
||||
|
||||
if (getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) {
|
||||
print $listofpartnership[getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')];
|
||||
print '<input type="hidden" id="partnershiptype" name="partnershiptype" value="' . getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE').'">';
|
||||
if (getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')) {
|
||||
print $listofpartnership[getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')];
|
||||
print '<input type="hidden" id="partnershiptype" name="partnershiptype" value="' . getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE').'">';
|
||||
}
|
||||
|
||||
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
|
||||
if (!getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) {
|
||||
if (!getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')) {
|
||||
print '<tr class="morphy"><td class="classfortooltip" title="'.dol_escape_htmltag($messagemandatory).'">'.$langs->trans('PartnershipType').' <span class="star">*</span></td><td>'."\n";
|
||||
print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOSTINT('partnershiptype') : 'ifone', 1);
|
||||
print '</td></tr>'."\n";
|
||||
|
|
|
|||
|
|
@ -645,9 +645,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int<0,max> $maxfilenamelength Max length of value to show
|
||||
* @return string[]|int<-1,0> List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2570,7 +2570,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
$i++;
|
||||
}
|
||||
if ($NBCOLS > 0 && $j % 2 == 1) {
|
||||
if ($NBCOLS > 0 && ($j % 2) == 1) {
|
||||
print '<td colspan="2"></td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018 Pierre Chéné <pierre.chene44@gmail.com>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Alexandre Janniaux <alexandre.janniaux@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2024 Christian Humpel <christian.humpel@gmail.com>
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com>
|
||||
* Copyright (C) 2024 Christian Humpel <christian.humpel@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -170,7 +171,7 @@ class Workstations extends DolibarrApi
|
|||
$obj_ret['pagination'] = array(
|
||||
'total' => (int) $total,
|
||||
'page' => $page, //count starts from 0
|
||||
'page_count' => ceil((int) $total/$limit),
|
||||
'page_count' => ceil((int) $total / $limit),
|
||||
'limit' => $limit
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,11 @@ parameters:
|
|||
- '#(?:Variable \$(?:_(?:FILES|POST|SERVER)|array_propal_object|baseUri|current_fiscal_period|d(?:b_create_(?:database|user)|olibarr_main_(?:db_prefix|url_root)|raftchecked)|erreur_ajout_date|isImageValid|keyforstripeterminalbank|(?:lo|mar)gin|max|n(?:ewProperty|um)|p(?:ermsgroupbyentitypluszero|ro(?:gressCalculated|parrayofkeyval)|ublic)|t(?:(?:itl|otal_tim)e|va_tx)|var)) in isset\(\) always exists and is not nullable#'
|
||||
- '#(?:Property CommonOrderLine::\$multicurrency_subprice \(float\) on left side of \?\?|isset\(\)) is not nullable#'
|
||||
- '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always false#'
|
||||
- '#(?:Comparison operation "(?:<(?:" between (?:0(?:(?:\|1)? and 0)|21(?: and 14|\.0 and 17)|int<(?:0, max>(?:(?:\|false)? and 0)|1, max> and 1)|null and 0)|=" between int<2, max> and 1)|>(?:" between (?:(?:-1|0) and 0|0(?: and 1(?:000)?|\|1\|2\|3 and 999)|1 and 1)|=" between 0 and 8))) is always fal#'
|
||||
- '#(?:Comparison operation "(?:<(?:" between (?:0(?:(?:\|1)? and 0)|int<(?:0, max>(?:(?:\|false)? and 0)|1, max> and 1)|null and 0)|=" between int<2, max> and 1)|>(?:" between (?:(?:-1|0) and 0|0(?: and 1(?:000)?|\|1\|2\|3 and 999)|1 and 1)))) is always false#'
|
||||
- '#(?:Comparison operation ">=" between 0 and 8) is always false#'
|
||||
|
||||
- "#(?:Comparison operation .<. between '' and 0 is always) true#"
|
||||
- '#(?:Comparison operation "(?:<(?:" between (?:(?:..|-1) and 0|0 and 4)|=" between (?:0 and 0|int<100, 999> and 999))|>(?:" between (?:1(?:(?:\|2)? and 0)|int<(?:1, max> and 0|2, max> and 1))|=" between (?:\S+ and 0|21\.0 and (?:15|6\.0)|int<(?:0, max> and 0|1, max> and 1))))) is always true#'
|
||||
- '#(?:Comparison operation "(?:<(?:" between (?:(?:..|-1) and 0|0 and 4)|=" between (?:0 and 0|int<100, 999> and 999))|>(?:" between (?:1(?:(?:\|2)? and 0)|int<(?:1, max> and 0|2, max> and 1))|=" between (?:\S+ and 0|int<(?:0, max> and 0|1, max> and 1))))) is always true#'
|
||||
- '#(?:Else branch is unreachable because (?:(?:previous|ternary operator) condition)) is always true#'
|
||||
- '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always true#'
|
||||
- '#is_object\(\) with mixed will always evaluate to false#'
|
||||
|
|
@ -78,7 +80,8 @@ parameters:
|
|||
- '#EvalMath::trigger\(\) expects string, int given#'
|
||||
- '# Diff::generatePartialDiff\(\) expects array#'
|
||||
- '# EmailCollector::getpart\(\) expects string#'
|
||||
- '#expects int, float#'
|
||||
- '#(?:convertSecondToTime) expects int, float\|string given#'
|
||||
- '#(?:Comm(?:(?:ande::updateline|on(?:Invoice::getLibStatut|StickerGenerator::(?:Set_Char_Size|_Croix|convertMetric)))\(\))|Facture(?:(?:::update|FournisseurRec::add)line\(\))|(?:Holiday::addLogCP|Loan::getLibStatut|SupplierProposal::updateline)\(\)|c(?:alcul_price_total|onvert(?:DurationtoHour|SecondToTime))|dol_(?:substr|time_plus_duree)|pdf_(?:azur::_tableau_(?:(?:info|tot)\(\))|ban(?:::_tableau\(\)|k)|c(?:anelle::_tableau_(?:(?:tot|versements)\(\))|ornas::_tableau_(?:(?:info|tot)\(\))|rabe::_tableau_(?:(?:info|tot|versements)\(\))|yan::draw(?:(?:Info|Total)Table\(\)))|e(?:agle(?:(?:::_tableau_tot|_proforma::drawTotalTable)\(\))|instein::_tableau_(?:(?:info|tot)\(\))|ratosthene::draw(?:(?:Info|Total)Table\(\))|spadon::_tableau_tot\(\))|muscadet::_tableau_(?:(?:info|tot)\(\))|octopus::(?:_table(?:(?:FirstPage|au)\(\))|draw(?:(?:Info|Total)Table\(\)))|page(?:foot|head)|(?:rouget::_tableau_tot|s(?:epamandate::_tableau(?:_info)?|ponge::draw(?:(?:Info|Total)Table)|quille::_tableau_tot|t(?:andard_(?:e(?:(?:valuation|xpensereport)::_tableau|xpensereport::tablePayments)|(?:myobjec|supplierpaymen)t::_tableau|supplierpayment::_tableau_cheque)|orm::_tableau_info|rato::tabSignature))|t(?:cpdflabel::writeBarcode|yphon::_tableau_info)|vinci::_tableau_info)\(\)|w(?:atermark|rite(?:LinkedObjects|linedesc))|zenith::_tableau_tot\(\))|usleep) expects int, float given\.#'
|
||||
- '#::saveboxorder\(\) expects int, array#'
|
||||
- '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process) expects int, array\|string given.#'
|
||||
- '# (CSMSFile) constructor expects int, array\|string given.#'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user