Merge pull request #28821 from mdeweerd/fix/PhanTypeMismatchPropertyProbablyReal

Fix & enable PhanTypeMismatchPropertyProbablyReal
This commit is contained in:
Laurent Destailleur 2024-03-15 15:21:53 +01:00 committed by GitHub
commit 8ce3584071
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 99 additions and 78 deletions

View file

@ -69,6 +69,7 @@ return [
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanParamSignatureMismatch', 'PhanParamSuspiciousOrder'],
'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanTypeMismatchPropertyProbablyReal'],
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic'],
@ -79,6 +80,7 @@ return [
'htdocs/public/opensurvey/index.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/recruitment/index.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/societe/paymentmodes.php' => ['PhanTypeMismatchPropertyProbablyReal'],
'htdocs/societe/class/companybankaccount.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/takepos/invoice.php' => ['PhanPluginSuspiciousParamPosition'],

View file

@ -457,7 +457,7 @@ return [
'PhanPluginUnknownClosureReturnType',
// 'PhanPluginNoCommentOnProtectedMethod',
// 'PhanTypeArraySuspicious',
'PhanTypeMismatchPropertyProbablyReal',
// 'PhanTypeMismatchPropertyProbablyReal',
// 'PhanPluginNoCommentOnPrivateMethod',
'PhanPluginUnknownArrayFunctionReturnType',
'PhanTypeInvalidLeftOperandOfAdd',

View file

@ -1683,7 +1683,7 @@ class Contrat extends CommonObject
$contractline->id = $contractlineid;
$result = $contractline->insertExtraFields();
if ($result < 0) {
$this->error[] = $contractline->error;
$this->errors[] = $contractline->error;
$error++;
}
}
@ -1877,7 +1877,7 @@ class Contrat extends CommonObject
$result = $contractline->insertExtraFields();
if ($result < 0) {
$this->error[] = $contractline->error;
$this->errors[] = $contractline->error;
$error++;
}
}

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -29,6 +30,10 @@
// $triggersendname must be set (can be '')
// $actiontypecode can be set
// $object and $uobject may be defined
'
@phan-var-force Societe $mysoc
@phan-var-force CommonObject $object
';
/*
* Add file in email form
@ -357,7 +362,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$substitutionarray['__EMAIL__'] = $sendto;
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
$parameters = array('mode'=>'formemail');
$parameters = array('mode' => 'formemail');
complete_substitutions_array($substitutionarray, $langs, $object, $parameters);
$subject = make_substitutions($subject, $substitutionarray);

View file

@ -226,13 +226,13 @@ abstract class CommonObject
/**
* @var Project The related project object
* @deprecated
* @see project
* @deprecated Use $project instead
* @see $project
*/
public $projet;
/**
* @deprecated
* @deprecated Use $fk_project instead
* @see $fk_project
*/
public $fk_projet;
@ -274,13 +274,13 @@ abstract class CommonObject
public $origin_id;
/**
* @var Object Origin object. This is set by fetch_origin() from this->origin and this->origin_id.
* @var ?CommonObject Origin object. This is set by fetch_origin() from this->origin and this->origin_id.
*/
public $origin_object;
/**
* @var string|CommonObject Sometime the type of the originating object ('commande', 'facture', ...), sometime the object (like onh MouvementStock)
* @deprecated Use now $origin_type and $origin_id;
* @var CommonObject|string|null Sometimes the type of the originating object ('commande', 'facture', ...), sometimes the object (as with MouvementStock)
* @deprecated Use now $origin_type and $origin_id;
* @see fetch_origin()
*/
public $origin;
@ -322,7 +322,7 @@ abstract class CommonObject
/**
* @var int The object's status. Use status instead.
* @deprecated
* @deprecated Use $status instead
* @see setStatut()
*/
public $statut;
@ -369,7 +369,7 @@ abstract class CommonObject
/**
* var int State ID
* @deprecated Use state_id. We can remove this property when the field 'fk_departement' have been renamed into 'state_id' in all tables
* @deprecated Use $state_id. We can remove this property when the field 'fk_departement' have been renamed into 'state_id' in all tables
*/
public $fk_departement;
@ -447,7 +447,7 @@ abstract class CommonObject
/**
* @var int Payment terms ID
* @deprecated Kept for compatibility
* @deprecated Use $cond_reglement_id instead - Kept for compatibility
* @see cond_reglement_id;
*/
public $cond_reglement;
@ -730,13 +730,13 @@ abstract class CommonObject
public $specimen = 0;
/**
* @var int Id of contact to send object (used by the trigger of module Agenda)
* @var int[] Id of contacts to send objects (mails, etc.)
*/
public $sendtoid;
/**
* @var float Amount already paid from getSommePaiement() (used to show correct status)
* @deprecated Duplicate of $totalpaid
* @deprecated Use $totalpaid instead
*/
public $alreadypaid;
/**

View file

@ -524,7 +524,7 @@ function societe_admin_prepare_head()
* @param Translate $outputlangs Langs object for output translation
* @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output
* @param string $searchlabel Label of country to search (warning: searching on label is not reliable)
* @return mixed Integer with country id or String with country code or translated country name or Array('id','code','label') or 'NotDefined'
* @return int|string|array{id:int,code:string,label:string} Integer with country id or String with country code or translated country name or Array('id','code','label') or 'NotDefined'
*/
function getCountry($searchkey, $withcode = '', $dbtouse = null, $outputlangs = null, $entconv = 1, $searchlabel = '')
{
@ -2043,6 +2043,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
}
}
'@phan-var-force array<int,array{userid:int,type:string,tododone:string,apicto:string,acode:string,alabel:string,note:string,id:int,percent:int<0,100>,datestart:int,dateend:int,fk_element:string,elementtype:string,contact_id:string,lastname:string,firstname:string,contact_photo:string,socpeaopleassigned:int[],login:string,userfirstname:string,userlastname:string,userphoto:string}> $histo';
if (isModEnabled('agenda') || (isModEnabled('mailing') && !empty($objcon->email))) {
$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;

View file

@ -7,6 +7,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2023-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
@ -615,7 +616,7 @@ class Delivery extends CommonObject
$result = $line->insertExtraFields();
if ($result < 0) {
$this->error[] = $line->error;
$this->errors[] = $line->error;
$error++;
}
}
@ -826,7 +827,7 @@ class Delivery extends CommonObject
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
$parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;

View file

@ -12,6 +12,7 @@
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
* 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

View file

@ -15,6 +15,7 @@
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2023 Nick Fragoulis
* 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
@ -1196,9 +1197,9 @@ class FactureFournisseur extends CommonInvoice
}
if (isset($this->fk_project)) {
if (empty($this->fk_project)) {
$this->fk_project = null;
$this->fk_project = 0;
} else {
$this->fk_project = intval($this->fk_project);
$this->fk_project = (int) $this->fk_project;
}
}
if (isset($this->cond_reglement_id)) {

View file

@ -5,6 +5,7 @@
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.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
@ -90,7 +91,7 @@ class MultiCurrency extends CommonObject
public $fk_user;
/**
* @var CurrencyRate|null The currency rate
* @var ?CurrencyRate The currency rate
*/
public $rate;

View file

@ -205,7 +205,7 @@ class Partnership extends CommonObject
public function create(User $user, $notrigger = 0)
{
if ($this->fk_soc <= 0 && $this->fk_member <= 0) {
$this->error[] = "ErrorThirpdartyOrMemberidIsMandatory";
$this->errors[] = "ErrorThirpdartyOrMemberidIsMandatory";
return -1;
}
@ -522,7 +522,7 @@ class Partnership extends CommonObject
public function update(User $user, $notrigger = 0)
{
if ($this->fk_soc <= 0 && $this->fk_member <= 0) {
$this->error[] = "ErrorThirpdartyOrMemberidIsMandatory";
$this->errors[] = "ErrorThirpdartyOrMemberidIsMandatory"; // Mistyping in key is in translations
return -1;
}
if (empty($this->fk_user_creat)) { // For the case the object was created with empty user (from public page).

View file

@ -807,7 +807,7 @@ if (empty($reshook)) {
if ($fk_default_bom >= 0) {
$object->fk_default_bom = $fk_default_bom;
} else {
$object->fk_default_bom = null;
$object->fk_default_bom = 0;
}
$units = GETPOSTINT('units');

View file

@ -311,7 +311,7 @@ class Product extends CommonObject
/**
* Status indicates whether the product is on sale '1' or not '0'
* @var int
* @deprecated
* @deprecated Use $status instead
* @see $status
*/
public $tosell;
@ -326,7 +326,7 @@ class Product extends CommonObject
/**
* Status indicate whether the product is available for purchase '1' or not '0'
* @var int
* @deprecated
* @deprecated Use $status_buy instead
* @see $status_buy
*/
public $tobuy;
@ -334,7 +334,7 @@ class Product extends CommonObject
/**
* Status indicates whether the product is a finished product '1' or a raw material '0'
*
* @var int
* @var ?int
*/
public $finished;

View file

@ -3,6 +3,7 @@
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ion Agorria <ion@agorria.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

View file

@ -2,6 +2,7 @@
/* Copyright (C) 2018-2020 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2018 Fédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
* 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
@ -689,7 +690,7 @@ if ($event->type == 'payout.created') {
$companypaymentmode->stripe_card_ref = $db->escape($event->data->object->id);
$companypaymentmode->fk_soc = $idthirdparty;
$companypaymentmode->bank = null;
$companypaymentmode->label = null;
$companypaymentmode->label = '';
$companypaymentmode->number = $db->escape($event->data->object->id);
$companypaymentmode->last_four = $db->escape($event->data->object->card->last4);
$companypaymentmode->card_type = $db->escape($event->data->object->card->branding);
@ -725,7 +726,7 @@ if ($event->type == 'payout.created') {
if ($companypaymentmode->id > 0) {
// If we found a payment mode with the ID
$companypaymentmode->bank = null;
$companypaymentmode->label = null;
$companypaymentmode->label = '';
$companypaymentmode->number = $db->escape($event->data->object->id);
$companypaymentmode->last_four = $db->escape($event->data->object->card->last4);
$companypaymentmode->proprio = $db->escape($event->data->object->billing_details->name);

View file

@ -12,6 +12,7 @@
* Copyright (C) 2016-2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
* Copyright (C) 2022-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
@ -125,7 +126,7 @@ class Reception extends CommonObject
public $listmeths; // List of carriers
/**
* @var CommandeFournisseur
* @var ?CommandeFournisseur
*/
public $commandeFournisseur;
@ -731,7 +732,11 @@ class Reception extends CommonObject
$this->fetch_origin();
if (empty($this->origin_object->lines)) {
$res = $this->origin_object->fetch_lines();
$this->commandeFournisseur = $this->origin_object; // deprecated
if ($this->origin_object instanceof CommandeFournisseur) {
$this->commandeFournisseur = $this->origin_object; // deprecated
} else {
$this->commandeFournisseur = null; // deprecated
}
if ($res < 0) {
return $res;
}
@ -742,7 +747,7 @@ class Reception extends CommonObject
$qty_wished = array();
$supplierorderdispatch = new CommandeFournisseurDispatch($this->db);
$filter = array('t.fk_commande'=>$this->origin_id);
$filter = array('t.fk_commande' => $this->origin_id);
if (getDolGlobalInt('SUPPLIER_ORDER_USE_DISPATCH_STATUS')) {
$filter['t.status'] = 1; // Restrict to lines with status validated
}
@ -1305,7 +1310,7 @@ class Reception extends CommonObject
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
$parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;

View file

@ -402,7 +402,8 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd) {
if ($object->id > 0) {
$object->paye = 0;
$object->id = $object->ref = null;
$object->id = 0;
$object->ref = '';
if (GETPOST('amount', 'alphanohtml')) {
$object->amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT', 2);

View file

@ -562,12 +562,12 @@ if (empty($reshook)) {
} else {
if ($result == -3 && in_array('ErrorCustomerCodeAlreadyUsed', $object->errors)) {
$duplicate_code_error = true;
$object->code_client = null;
$object->code_client = '';
}
if ($result == -3 && in_array('ErrorSupplierCodeAlreadyUsed', $object->errors)) {
$duplicate_code_error = true;
$object->code_fournisseur = null;
$object->code_fournisseur = '';
}
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { // TODO Sometime errors on duplicate on profid and not on code, so we must manage this case

View file

@ -94,43 +94,43 @@ class CompanyBankAccount extends Account
'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php', 'label' => 'ThirdParty', 'picto' => 'company', 'enabled' => 1, 'position' => 20, 'notnull' => 1, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',),
'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'position' => 25, 'notnull' => 0, 'visible' => -1,),
'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'position' => 30, 'notnull' => 1, 'visible' => -1,),
'label' => array('type' => 'varchar(200)', 'label' => 'Label', 'enabled' => 1, 'position' => 35, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1', 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax150',),
'bank' => array('type' => 'varchar(255)', 'label' => 'Bank', 'enabled' => 1, 'position' => 40, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'code_banque' => array('type' => 'varchar(128)', 'label' => 'Codebanque', 'enabled' => 1, 'position' => 45, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'code_guichet' => array('type' => 'varchar(6)', 'label' => 'Codeguichet', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'number' => array('type' => 'varchar(255)', 'label' => 'Number', 'enabled' => 1, 'position' => 55, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'cle_rib' => array('type' => 'varchar(5)', 'label' => 'Clerib', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'bic' => array('type' => 'varchar(20)', 'label' => 'Bic', 'enabled' => 1, 'position' => 65, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'iban_prefix' => array('type' => 'varchar(34)', 'label' => 'Ibanprefix', 'enabled' => 1, 'position' => 70, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'domiciliation' => array('type' => 'varchar(255)', 'label' => 'Domiciliation', 'enabled' => 1, 'position' => 75, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'proprio' => array('type' => 'varchar(60)', 'label' => 'Proprio', 'enabled' => 1, 'position' => 80, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'owner_address' => array('type' => 'varchar(255)', 'label' => 'Owneraddress', 'enabled' => 1, 'position' => 85, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'default_rib' => array('type' => 'smallint(6)', 'label' => 'Defaultrib', 'enabled' => 1, 'position' => 90, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => '1',),
'state_id' => array('type' => 'integer', 'label' => 'Stateid', 'enabled' => 1, 'position' => 95, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'fk_country' => array('type' => 'integer', 'label' => 'Fkcountry', 'enabled' => 1, 'position' => 100, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1', 'css' => 'maxwidth500 widthcentpercentminusxx',),
'currency_code' => array('type' => 'varchar(3)', 'label' => 'Currencycode', 'enabled' => 1, 'position' => 105, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'rum' => array('type' => 'varchar(32)', 'label' => 'Rum', 'enabled' => 1, 'position' => 110, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'date_rum' => array('type' => 'date', 'label' => 'Daterum', 'enabled' => 1, 'position' => 115, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'frstrecur' => array('type' => 'varchar(16)', 'label' => 'Frstrecur', 'enabled' => 1, 'position' => 120, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 900, 'notnull' => 0, 'visible' => -2, 'alwayseditable' => '1',),
'last_four' => array('type' => 'varchar(4)', 'label' => 'Lastfour', 'enabled' => 1, 'position' => 130, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'card_type' => array('type' => 'varchar(255)', 'label' => 'Cardtype', 'enabled' => 1, 'position' => 135, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'cvn' => array('type' => 'varchar(255)', 'label' => 'Cvn', 'enabled' => 1, 'position' => 140, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'exp_date_month' => array('type' => 'integer', 'label' => 'Expdatemonth', 'enabled' => 1, 'position' => 145, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'exp_date_year' => array('type' => 'integer', 'label' => 'Expdateyear', 'enabled' => 1, 'position' => 150, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'country_code' => array('type' => 'varchar(10)', 'label' => 'Countrycode', 'enabled' => 1, 'position' => 155, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'approved' => array('type' => 'integer', 'label' => 'Approved', 'enabled' => 1, 'position' => 160, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'position' => 165, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'ending_date' => array('type' => 'date', 'label' => 'Endingdate', 'enabled' => 1, 'position' => 170, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'max_total_amount_of_all_payments' => array('type' => 'double(24,8)', 'label' => 'Maxtotalamountofallpayments', 'enabled' => 1, 'position' => 175, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'preapproval_key' => array('type' => 'varchar(255)', 'label' => 'Preapprovalkey', 'enabled' => 1, 'position' => 180, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'starting_date' => array('type' => 'date', 'label' => 'Startingdate', 'enabled' => 1, 'position' => 185, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'total_amount_of_all_payments' => array('type' => 'double(24,8)', 'label' => 'Totalamountofallpayments', 'enabled' => 1, 'position' => 190, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'stripe_card_ref' => array('type' => 'varchar(128)', 'label' => 'Stripecardref', 'enabled' => 1, 'position' => 195, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'position' => 500, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => '1',),
'comment' => array('type' => 'varchar(255)', 'label' => 'Comment', 'enabled' => 1, 'position' => 205, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'ipaddress' => array('type' => 'varchar(68)', 'label' => 'Ipaddress', 'enabled' => 1, 'position' => 210, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'stripe_account' => array('type' => 'varchar(128)', 'label' => 'Stripeaccount', 'enabled' => 1, 'position' => 215, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => '1',),
'label' => array('type' => 'varchar(200)', 'label' => 'Label', 'enabled' => 1, 'position' => 35, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax150',),
'bank' => array('type' => 'varchar(255)', 'label' => 'Bank', 'enabled' => 1, 'position' => 40, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'code_banque' => array('type' => 'varchar(128)', 'label' => 'Codebanque', 'enabled' => 1, 'position' => 45, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'code_guichet' => array('type' => 'varchar(6)', 'label' => 'Codeguichet', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'number' => array('type' => 'varchar(255)', 'label' => 'Number', 'enabled' => 1, 'position' => 55, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'cle_rib' => array('type' => 'varchar(5)', 'label' => 'Clerib', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'bic' => array('type' => 'varchar(20)', 'label' => 'Bic', 'enabled' => 1, 'position' => 65, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'iban_prefix' => array('type' => 'varchar(34)', 'label' => 'Ibanprefix', 'enabled' => 1, 'position' => 70, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'domiciliation' => array('type' => 'varchar(255)', 'label' => 'Domiciliation', 'enabled' => 1, 'position' => 75, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'proprio' => array('type' => 'varchar(60)', 'label' => 'Proprio', 'enabled' => 1, 'position' => 80, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'owner_address' => array('type' => 'varchar(255)', 'label' => 'Owneraddress', 'enabled' => 1, 'position' => 85, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'default_rib' => array('type' => 'smallint(6)', 'label' => 'Defaultrib', 'enabled' => 1, 'position' => 90, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => 1,),
'state_id' => array('type' => 'integer', 'label' => 'Stateid', 'enabled' => 1, 'position' => 95, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'fk_country' => array('type' => 'integer', 'label' => 'Fkcountry', 'enabled' => 1, 'position' => 100, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1, 'css' => 'maxwidth500 widthcentpercentminusxx',),
'currency_code' => array('type' => 'varchar(3)', 'label' => 'Currencycode', 'enabled' => 1, 'position' => 105, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'rum' => array('type' => 'varchar(32)', 'label' => 'Rum', 'enabled' => 1, 'position' => 110, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'date_rum' => array('type' => 'date', 'label' => 'Daterum', 'enabled' => 1, 'position' => 115, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'frstrecur' => array('type' => 'varchar(16)', 'label' => 'Frstrecur', 'enabled' => 1, 'position' => 120, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 900, 'notnull' => 0, 'visible' => -2, 'alwayseditable' => 1,),
'last_four' => array('type' => 'varchar(4)', 'label' => 'Lastfour', 'enabled' => 1, 'position' => 130, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'card_type' => array('type' => 'varchar(255)', 'label' => 'Cardtype', 'enabled' => 1, 'position' => 135, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'cvn' => array('type' => 'varchar(255)', 'label' => 'Cvn', 'enabled' => 1, 'position' => 140, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'exp_date_month' => array('type' => 'integer', 'label' => 'Expdatemonth', 'enabled' => 1, 'position' => 145, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'exp_date_year' => array('type' => 'integer', 'label' => 'Expdateyear', 'enabled' => 1, 'position' => 150, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'country_code' => array('type' => 'varchar(10)', 'label' => 'Countrycode', 'enabled' => 1, 'position' => 155, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'approved' => array('type' => 'integer', 'label' => 'Approved', 'enabled' => 1, 'position' => 160, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'position' => 165, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'ending_date' => array('type' => 'date', 'label' => 'Endingdate', 'enabled' => 1, 'position' => 170, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'max_total_amount_of_all_payments' => array('type' => 'double(24,8)', 'label' => 'Maxtotalamountofallpayments', 'enabled' => 1, 'position' => 175, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'preapproval_key' => array('type' => 'varchar(255)', 'label' => 'Preapprovalkey', 'enabled' => 1, 'position' => 180, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'starting_date' => array('type' => 'date', 'label' => 'Startingdate', 'enabled' => 1, 'position' => 185, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'total_amount_of_all_payments' => array('type' => 'double(24,8)', 'label' => 'Totalamountofallpayments', 'enabled' => 1, 'position' => 190, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'stripe_card_ref' => array('type' => 'varchar(128)', 'label' => 'Stripecardref', 'enabled' => 1, 'position' => 195, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'position' => 500, 'notnull' => 1, 'visible' => -1, 'alwayseditable' => 1,),
'comment' => array('type' => 'varchar(255)', 'label' => 'Comment', 'enabled' => 1, 'position' => 205, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'ipaddress' => array('type' => 'varchar(68)', 'label' => 'Ipaddress', 'enabled' => 1, 'position' => 210, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'stripe_account' => array('type' => 'varchar(128)', 'label' => 'Stripeaccount', 'enabled' => 1, 'position' => 215, 'notnull' => 0, 'visible' => -1, 'alwayseditable' => 1,),
'last_main_doc' => array('type' => 'varchar(255)', 'label' => 'LastMainDoc', 'enabled' => 1, 'visible' => 0, 'position' => 230),
);

View file

@ -76,7 +76,7 @@ class Ticket extends CommonObject
/**
* @var string Hash to identify ticket publicly
* @var ?string Hash to identify ticket publicly
*/
public $track_id;
@ -97,17 +97,17 @@ class Ticket extends CommonObject
public $fk_contract;
/**
* @var string Person email who have create ticket
* @var ?string Email of person who created the ticket
*/
public $origin_email;
/**
* @var int User id who have create ticket
* @var int User id who created the ticket
*/
public $fk_user_create;
/**
* @var int User id who have ticket assigned
* @var int User id who the ticket is assigned to
*/
public $fk_user_assign;

View file

@ -884,7 +884,7 @@ class ProductCombination
if ($result < 0) {
//In case the error is not related with an already existing product
if ($newproduct->error != 'ErrorProductAlreadyExists') {
$this->error[] = $newproduct->error;
$this->error = $newproduct->error;
$this->errors = $newproduct->errors;
$this->db->rollback();
return -1;