trimtrailing

This commit is contained in:
Frédéric FRANCE 2018-08-28 08:33:02 +02:00
parent 50d50c2e10
commit 1182f29864
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
26 changed files with 150 additions and 137 deletions

View File

@ -30,31 +30,31 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
*/
class AccountancyCategory // extends CommonObject
{
/**
/**
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error string
* @see errors
*/
public $error;
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var string ID to identify managed object
*/
public $element='c_accounting_category';
public $element='c_accounting_category';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='c_accounting_category';
public $table_element='c_accounting_category';
public $id;
public $code;

View File

@ -31,12 +31,12 @@
class AccountingAccount extends CommonObject
{
public $element='accounting_account';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='accounting_account';
public $picto = 'billr';
/**
@ -44,7 +44,7 @@ class AccountingAccount extends CommonObject
* @var int
*/
public $ismultientitymanaged = 1;
/**
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
* @var integer
@ -55,22 +55,22 @@ class AccountingAccount extends CommonObject
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error code (or message)
*/
public $error='';
public $error='';
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var int ID
*/
public $id;
var $rowid;
var $datec; // Creation date
var $fk_pcg_version;
@ -79,12 +79,12 @@ class AccountingAccount extends CommonObject
var $account_number;
var $account_parent;
var $account_category;
/**
* @var string proper name for given parameter
*/
public $label;
var $fk_user_author;
var $fk_user_modif;
var $active; // duplicate with status

View File

@ -31,7 +31,7 @@ abstract class ActionsAdherentCardCommon
* @var DoliDB Database handler.
*/
public $db;
var $dirmodule;
var $targetmodule;
var $canvas;
@ -41,11 +41,11 @@ abstract class ActionsAdherentCardCommon
var $tpl = array();
//! Object container
var $object;
/**
* @var string Error code (or message)
*/
public $error='';
public $error='';
/**
* @var string[] Error codes (or messages)

View File

@ -45,12 +45,12 @@ class Adherent extends CommonObject
* @var string ID to identify managed object
*/
public $element='member';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='adherent';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $mesgs;
@ -542,10 +542,10 @@ class Adherent extends CommonObject
$luser->birth=$this->birth;
$luser->address=$this->address;
$luser->zip=$this->zip;
$luser->town=$this->town;
$luser->country_id=$this->country_id;
$luser->town=$this->town;
$luser->country_id=$this->country_id;
$luser->state_id=$this->state_id;
$luser->email=$this->email;
$luser->skype=$this->skype;
$luser->office_phone=$this->phone;

View File

@ -28,30 +28,30 @@
*/
class AdvanceTargetingMailing extends CommonObject
{
/**
* @var DoliDB Database handler.
*/
public $db;
/**
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error code (or message)
*/
public $error='';
public $error='';
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var string ID to identify managed object
*/
public $element='advtargetemailing';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='advtargetemailing';
public $table_element='advtargetemailing';
/**
* @var int ID

View File

@ -32,13 +32,13 @@ class Localtax extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='localtax';
public $element='localtax';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='localtax';
public $picto='payment';
var $ltt;
@ -46,12 +46,12 @@ class Localtax extends CommonObject
var $datep;
var $datev;
var $amount;
/**
* @var string proper name for given parameter
*/
public $label;
var $fk_bank;
var $fk_user_creat;
var $fk_user_modif;

View File

@ -35,12 +35,12 @@ class PaymentSalary extends CommonObject
* @var string ID to identify managed object
*/
public $element='payment_salary';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_salary';
public $table_element='payment_salary';
public $picto='payment';
public $tms;

View File

@ -35,12 +35,12 @@ class PaymentSocialContribution extends CommonObject
* @var string ID to identify managed object
*/
public $element='paiementcharge';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='paiementcharge';
public $table_element='paiementcharge';
public $picto = 'payment';
var $fk_charge;
@ -716,5 +716,3 @@ class PaymentSocialContribution extends CommonObject
return $result;
}
}

View File

@ -1,4 +1,21 @@
<?php
/*
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* Class to manage comment
*/
@ -8,11 +25,11 @@ class Comment extends CommonObject
* @var string ID to identify managed object
*/
public $element='comment';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='comment';
public $table_element='comment';
public $fk_element;
public $element_type;

View File

@ -30,7 +30,7 @@
/**
* Events class
* Events class
*/
class Events // extends CommonObject
{
@ -38,18 +38,18 @@ class Events // extends CommonObject
* @var string ID to identify managed object
*/
public $element='events';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='events';
public $table_element='events';
/**
* @var int ID
*/
public $id;
/**
/**
* @var DoliDB Database handler.
*/
public $db;

View File

@ -31,13 +31,13 @@ class Menubase
/**
* @var DoliDB Database handler.
*/
public $db;
public $db;
/**
* @var string Error code (or message)
*/
public $error;
* @var string Error code (or message)
*/
public $error;
/**
* @var string[] Error codes (or messages)
*/
@ -696,4 +696,3 @@ class Menubase
}
}

View File

@ -34,12 +34,12 @@ class Cronjob extends CommonObject
* @var string ID to identify managed object
*/
public $element='cronjob';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='cronjob';
public $table_element='cronjob';
public $picto = 'cron';
public $entity;

View File

@ -32,13 +32,13 @@ class PaymentDonation extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='payment_donation';
public $element='payment_donation';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_donation';
public $picto = 'payment';
public $rowid;
@ -76,7 +76,7 @@ class PaymentDonation extends CommonObject
* Use this->amounts to have list of lines for the payment
*
* @param User $user User making payment
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, id of payment if OK
*/
function create($user, $notrigger=false)

View File

@ -31,8 +31,8 @@ class ExpeditionLineBatch extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='expeditionlignebatch';
public $element='expeditionlignebatch';
private static $_table_element='expeditiondet_batch'; //!< Name of table without prefix where object is stored
var $sellby;
@ -63,15 +63,15 @@ class ExpeditionLineBatch extends CommonObject
function fetchFromStock($id_stockdluo)
{
$sql = "SELECT";
$sql.= " pb.batch,";
$sql.= " pl.sellby,";
$sql.= " pl.eatby,";
$sql.= " ps.fk_entrepot";
$sql.= " pb.batch,";
$sql.= " pl.sellby,";
$sql.= " pl.eatby,";
$sql.= " ps.fk_entrepot";
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as pb";
$sql.= " JOIN ".MAIN_DB_PREFIX."product_stock as ps on pb.fk_product_stock=ps.rowid";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product";
$sql.= " WHERE pb.rowid = ".(int) $id_stockdluo;
$sql.= " WHERE pb.rowid = ".(int) $id_stockdluo;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql=$this->db->query($sql);

View File

@ -34,12 +34,12 @@ class PaymentExpenseReport extends CommonObject
* @var string ID to identify managed object
*/
public $element='payment_expensereport';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_expensereport';
public $table_element='payment_expensereport';
public $picto = 'payment';
var $rowid;

View File

@ -34,26 +34,26 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
*/
class CommandeFournisseurDispatch extends CommonObject
{
/**
/**
* @var DoliDB Database handler.
*/
public $db;
public $db;
/**
* @var string Error code (or message)
*/
public $error;
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var string ID to identify managed object
*/
public $element='commandefournisseurdispatch';
/**
* @var string Name of table without prefix where object is stored
*/

View File

@ -17,8 +17,8 @@
/**
* \file htdocs/loan/class/loanschedule.class.php
* \ingroup facture
* \brief File of class to manage schedule of loans
* \ingroup loan
* \brief File of class to manage schedule of loans
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
@ -33,11 +33,11 @@ class LoanSchedule extends CommonObject
* @var string ID to identify managed object
*/
public $element='loan_schedule';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='loan_schedule';
public $table_element='loan_schedule';
var $fk_loan;
var $datec='';
@ -547,4 +547,3 @@ class LoanSchedule extends CommonObject
return $result;
}
}

View File

@ -34,11 +34,11 @@ class PaymentLoan extends CommonObject
* @var string ID to identify managed object
*/
public $element='payment_loan';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_loan';
public $table_element='payment_loan';
var $fk_loan;
var $datec='';

View File

@ -38,12 +38,12 @@ class Opensurveysondage extends CommonObject
* @var string ID to identify managed object
*/
public $element='opensurvey_sondage';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='opensurvey_sondage';
public $table_element='opensurvey_sondage';
public $picto = 'opensurvey';
public $id_sondage;

View File

@ -33,8 +33,8 @@ class Productbatch extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='productbatch';
public $element='productbatch';
private static $_table_element='product_batch'; //!< Name of table without prefix where object is stored
var $tms='';

View File

@ -31,13 +31,13 @@ class Productcustomerprice extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element = 'product_customer_price';
public $element = 'product_customer_price';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'product_customer_price';
public $table_element = 'product_customer_price';
var $entity;
var $datec = '';
var $tms = '';
@ -962,7 +962,7 @@ class PriceByCustomerLine
* @var int ID
*/
public $id;
var $entity;
var $datec = '';
var $tms = '';

View File

@ -34,12 +34,12 @@ class Propalmergepdfproduct extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='propal_merge_pdf_product';
public $element='propal_merge_pdf_product';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='propal_merge_pdf_product';
public $table_element='propal_merge_pdf_product';
var $fk_product;
var $file_name;

View File

@ -36,13 +36,13 @@ class Project extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element = 'project';
public $element = 'project';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'projet';
public $table_element = 'projet';
public $table_element_line = 'projet_task';
public $fk_element = 'fk_projet';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@ -732,10 +732,10 @@ class Project extends CommonObject
return -1;
}
}
/**
* Delete tasks with no children first, then task with children recursively
*
*
* @param User $user User
* @return int <0 if KO, 1 if OK
*/
@ -763,7 +763,7 @@ class Project extends CommonObject
{
if (count($this->lines)) $this->deleteTasks($this->lines);
}
return 1;
}

View File

@ -34,24 +34,24 @@ class Task extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='project_task';
public $element='project_task';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='projet_task';
public $table_element='projet_task';
public $fk_element='fk_task';
public $picto = 'task';
protected $childtables=array('projet_task_time'); // To test if we can delete object
var $fk_task_parent;
/**
/**
* @var string proper name for given parameter
*/
public $label;
var $description;
var $duration_effective; // total of time spent on this task
var $planned_workload;

View File

@ -33,13 +33,13 @@ class Dolresource extends CommonObject
/**
* @var string ID to identify managed object
*/
public $element='dolresource';
public $element='dolresource';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='resource';
public $table_element='resource';
public $picto = 'resource';
public $resource_id;

View File

@ -36,26 +36,26 @@ class Ticketlogs// extends CommonObject
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error code (or message)
*/
public $error;
* @var string Error code (or message)
*/
public $error;
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var string ID to identify managed object
*/
public $element = 'ticketlogs';
* @var string ID to identify managed object
*/
public $element = 'ticketlogs';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored
public $id;