Update and standardize code

This commit is contained in:
Philippe GRAND 2018-08-22 18:48:53 +02:00
parent 504b0e3d16
commit 06da7f54a2
23 changed files with 144 additions and 16 deletions

View File

@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
class Cronjob extends CommonObject
{
public $element='cronjob'; //!< Id that identify managed objects
public $table_element='cronjob'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='cronjob';
public $picto = 'cron';
public $entity;

View File

@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
class Don extends CommonObject
{
public $element='don'; // Id that identify managed objects
public $table_element='don'; // Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='don';
public $fk_element = 'fk_donation';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $picto = 'generic';

View File

@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
*/
class DonationStats extends Stats
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;

View File

@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class PaymentDonation extends CommonObject
{
public $element='payment_donation'; //!< Id that identify managed objects
public $table_element='payment_donation'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_donation';
public $picto = 'payment';
public $rowid;

View File

@ -28,7 +28,12 @@
class EcmDirectory // extends CommonObject
{
public $element='ecm_directories'; //!< Id that identify managed objects
//public $table_element='ecm_directories'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
//public $table_element='ecm_directories';
var $picto = 'dir';
/**

View File

@ -40,14 +40,14 @@ class EcmFiles extends CommonObject
* @var string Id to identify managed objects
*/
public $element = 'ecmfiles';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'ecm_files';
public $picto = 'generic';
/**
*/
public $ref; // hash of file path
public $label; // hash of file content (md5_file(dol_osencode($destfull))
public $share; // hash for file sharing, empty by default (example: getRandomPassword(true))
@ -68,10 +68,7 @@ class EcmFiles extends CommonObject
public $acl;
public $src_object_type;
public $src_object_id;
/**
*/
/**
* Constructor

View File

@ -46,7 +46,12 @@ class Expedition extends CommonObject
{
public $element="shipping";
public $fk_element="fk_expedition";
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element="expedition";
public $table_element_line="expeditiondet";
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'sending';
@ -2268,6 +2273,10 @@ class Expedition extends CommonObject
class ExpeditionLigne extends CommonObjectLine
{
public $element='expeditiondet';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='expeditiondet';
public $fk_origin_line;

View File

@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
*/
class ExpeditionStats extends Stats
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;

View File

@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php';
class ExpenseReportIk extends CoreObject
{
public $element='expenseik';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='expensereport_ik';
public $fk_element='fk_expense_ik';
/**

View File

@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php';
class ExpenseReportRule extends CoreObject
{
public $element='expenserule';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='expensereport_rules';
public $fk_element='fk_expense_rule';
/**

View File

@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
*/
class ExpenseReportStats extends Stats
{
public $table_element;
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;
var $userid;

View File

@ -31,7 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class PaymentExpenseReport extends CommonObject
{
public $element='payment_expensereport'; //!< Id that identify managed objects
public $table_element='payment_expensereport'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_expensereport';
public $picto = 'payment';
var $rowid;

View File

@ -36,7 +36,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php';
class Fichinter extends CommonObject
{
public $element='fichinter';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='fichinter';
public $fk_element='fk_fichinter';
public $table_element_line='fichinterdet';
public $picto = 'intervention';
@ -1327,7 +1332,12 @@ class FichinterLigne extends CommonObjectLine
var $rang = 0;
public $element='fichinterdet';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='fichinterdet';
public $fk_element='fk_fichinter';
/**

View File

@ -33,6 +33,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
*/
class FichinterStats extends Stats
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;

View File

@ -41,15 +41,22 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
class CommandeFournisseur extends CommonOrder
{
public $element='order_supplier';
public $table_element='commande_fournisseur';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='commande_fournisseur';
public $table_element_line = 'commande_fournisseurdet';
public $fk_element = 'fk_commande';
public $picto='order';
/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @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
@ -68,6 +75,7 @@ class CommandeFournisseur extends CommonOrder
* @var string
*/
public $ref;
public $ref_supplier;
public $brouillon;
public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
@ -3085,6 +3093,10 @@ class CommandeFournisseur extends CommonOrder
class CommandeFournisseurLigne extends CommonOrderLine
{
public $element='commande_fournisseurdet';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='commande_fournisseurdet';
public $oldline;

View File

@ -42,15 +42,22 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
class FactureFournisseur extends CommonInvoice
{
public $element='invoice_supplier';
public $table_element='facture_fourn';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='facture_fourn';
public $table_element_line='facture_fourn_det';
public $fk_element='fk_facture_fourn';
public $picto='bill';
/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @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
@ -100,11 +107,13 @@ class FactureFournisseur extends CommonInvoice
public $total_localtax1=0;
public $total_localtax2=0;
public $total_ttc=0;
/**
* @deprecated
* @see note_private, note_public
*/
public $note;
public $note_private;
public $note_public;
public $propalid;
@ -2557,6 +2566,10 @@ class FactureFournisseur extends CommonInvoice
class SupplierInvoiceLine extends CommonObjectLine
{
public $element='facture_fourn_det';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='facture_fourn_det';
public $oldline;
@ -2566,6 +2579,7 @@ class SupplierInvoiceLine extends CommonObjectLine
* @see product_ref
*/
public $ref;
/**
* Internal ref
* @var string
@ -2584,6 +2598,7 @@ class SupplierInvoiceLine extends CommonObjectLine
* @see label
*/
public $libelle;
/**
* Product description
* @var string
@ -2597,6 +2612,7 @@ class SupplierInvoiceLine extends CommonObjectLine
* @see subprice
*/
public $pu_ht;
public $subprice;
/**
@ -2612,6 +2628,7 @@ class SupplierInvoiceLine extends CommonObjectLine
* @see total_tva
*/
public $tva;
public $total_tva;
/**

View File

@ -36,7 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
class PaiementFourn extends Paiement
{
public $element='payment_supplier';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='paiementfourn';
public $picto = 'payment';
var $statut; //Status of payment. 0 = unvalidated; 1 = validated

View File

@ -33,7 +33,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
class Holiday extends CommonObject
{
public $element='holiday';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='holiday';
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $fk_element = 'fk_holiday';
public $picto = 'holiday';

View File

@ -29,7 +29,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
class Establishment extends CommonObject
{
public $element='establishment';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='establishment';
public $table_element_line = '';
public $fk_element = 'fk_establishment';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

View File

@ -41,7 +41,12 @@ class Livraison extends CommonObject
{
public $element="delivery";
public $fk_element="fk_livraison";
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element="livraison";
public $table_element_line="livraisondet";
var $brouillon;
@ -1091,6 +1096,10 @@ class LivraisonLigne extends CommonObjectLine
public $product_label;
public $element='livraisondet';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='livraisondet';
/**

View File

@ -31,6 +31,10 @@ class Loan extends CommonObject
{
public $element='loan';
public $table='loan';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='loan';
public $picto = 'bill';

View File

@ -30,7 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class LoanSchedule extends CommonObject
{
public $element='loan_schedule'; //!< Id that identify managed objects
public $table_element='loan_schedule'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='loan_schedule';
var $fk_loan;
var $datec='';

View File

@ -31,7 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class PaymentLoan extends CommonObject
{
public $element='payment_loan'; //!< Id that identify managed objects
public $table_element='payment_loan'; //!< Name of table without prefix where object is stored
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='payment_loan';
var $fk_loan;
var $datec='';