Skip to content

Commit

Permalink
Merge pull request #9414 from grandoc/new_branch_03_09_2018
Browse files Browse the repository at this point in the history
Standardize and update code
  • Loading branch information
eldy committed Sep 7, 2018
2 parents 86cf289 + 3c06527 commit f0dafb7
Show file tree
Hide file tree
Showing 31 changed files with 211 additions and 100 deletions.
3 changes: 3 additions & 0 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -64,6 +64,9 @@ class Commande extends CommonOrder
*/
public $fk_element = 'fk_commande';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'order';

/**
Expand Down
6 changes: 6 additions & 0 deletions htdocs/compta/bank/class/account.class.php
Expand Up @@ -46,6 +46,9 @@ class Account extends CommonObject
*/
public $table_element = 'bank_account';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'account';

/**
Expand Down Expand Up @@ -1664,6 +1667,9 @@ class AccountLine extends CommonObject
*/
public $table_element='bank';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'generic';

/**
Expand Down
5 changes: 4 additions & 1 deletion htdocs/compta/bank/class/bankcateg.class.php
Expand Up @@ -30,7 +30,10 @@ class BankCateg // extends CommonObject
{
//public $element='bank_categ'; //!< Id that identify managed objects
//public $table_element='bank_categ'; //!< Name of table without prefix where object is stored
public $picto='generic';
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='generic';

/**
* @var int ID
Expand Down
3 changes: 3 additions & 0 deletions htdocs/compta/bank/class/paymentvarious.class.php
Expand Up @@ -40,6 +40,9 @@ class PaymentVarious extends CommonObject
*/
public $table_element='payment_various';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'bill';

/**
Expand Down
3 changes: 3 additions & 0 deletions htdocs/compta/facture/class/facture-rec.class.php
Expand Up @@ -59,6 +59,9 @@ class FactureRec extends CommonInvoice
*/
public $fk_element='fk_facture';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='bill';

public $entity;
Expand Down
3 changes: 3 additions & 0 deletions htdocs/compta/facture/class/facture.class.php
Expand Up @@ -73,6 +73,9 @@ class Facture extends CommonInvoice
*/
public $fk_element = 'fk_facture';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='bill';

/**
Expand Down
19 changes: 11 additions & 8 deletions htdocs/compta/localtax/class/localtax.class.php
Expand Up @@ -39,22 +39,25 @@ class Localtax extends CommonObject
*/
public $table_element='localtax';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='payment';

var $ltt;
var $tms;
var $datep;
var $datev;
var $amount;
public $ltt;
public $tms;
public $datep;
public $datev;
public $amount;

/**
* @var string local tax
*/
public $label;

var $fk_bank;
var $fk_user_creat;
var $fk_user_modif;
public $fk_bank;
public $fk_user_creat;
public $fk_user_modif;

/**
* Constructor
Expand Down
9 changes: 6 additions & 3 deletions htdocs/compta/paiement/cheque/class/remisecheque.class.php
Expand Up @@ -43,12 +43,15 @@ class RemiseCheque extends CommonObject
*/
public $table_element='bordereau_cheque';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

var $num;
var $intitule;
public $num;
public $intitule;
//! Numero d'erreur Plage 1024-1279
var $errno;
public $errno;

public $amount;
public $date_bordereau;
Expand Down
40 changes: 23 additions & 17 deletions htdocs/compta/paiement/class/paiement.class.php
Expand Up @@ -40,40 +40,46 @@ class Paiement extends CommonObject
* @var string ID to identify managed object
*/
public $element='payment';

/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='paiement';

public $picto = 'payment';

var $facid;
var $datepaye;
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

public $facid;
public $datepaye;

/**
* @deprecated
* @see amount, amounts
*/
var $total;
public $total;

/**
* @deprecated
* @see amount, amounts
*/
var $montant;
var $amount; // Total amount of payment
var $amounts=array(); // Array of amounts
var $multicurrency_amounts=array(); // Array of amounts
var $author;
var $paiementid; // Type de paiement. Stocke dans fk_paiement
public $montant;

public $amount; // Total amount of payment
public $amounts=array(); // Array of amounts
public $multicurrency_amounts=array(); // Array of amounts
public $author;
public $paiementid; // Type de paiement. Stocke dans fk_paiement
// de llx_paiement qui est lie aux types de
//paiement de llx_c_paiement
var $num_paiement; // Numero du CHQ, VIR, etc...
var $num_payment; // Numero du CHQ, VIR, etc...
var $bank_account; // Id compte bancaire du paiement
var $bank_line; // Id de la ligne d'ecriture bancaire
public $num_paiement; // Numero du CHQ, VIR, etc...
public $num_payment; // Numero du CHQ, VIR, etc...
public $bank_account; // Id compte bancaire du paiement
public $bank_line; // Id de la ligne d'ecriture bancaire
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
// fk_paiement dans llx_paiement_facture est le rowid du paiement
var $fk_paiement; // Type of paiment
public $fk_paiement; // Type of paiment


/**
Expand Down
45 changes: 24 additions & 21 deletions htdocs/compta/prelevement/class/bonprelevement.class.php
Expand Up @@ -43,33 +43,36 @@ class BonPrelevement extends CommonObject
* @var string ID to identify managed object
*/
public $element='widthdraw';

/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='prelevement_bons';


/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

var $date_echeance;
var $raison_sociale;
var $reference_remise;
var $emetteur_code_guichet;
var $emetteur_numero_compte;
var $emetteur_code_banque;
var $emetteur_number_key;
public $date_echeance;
public $raison_sociale;
public $reference_remise;
public $emetteur_code_guichet;
public $emetteur_numero_compte;
public $emetteur_code_banque;
public $emetteur_number_key;

var $emetteur_iban;
var $emetteur_bic;
var $emetteur_ics;
public $emetteur_iban;
public $emetteur_bic;
public $emetteur_ics;

var $total;
var $_fetched;
var $statut; // 0-Wait, 1-Trans, 2-Done
var $labelstatut=array();
public $total;
public $fetched;
public $statut; // 0-Wait, 1-Trans, 2-Done
public $labelstatut=array();

var $invoice_in_error=array();
var $thirdparty_in_error=array();
public $invoice_in_error=array();
public $thirdparty_in_error=array();


/**
Expand Down Expand Up @@ -106,7 +109,7 @@ function __construct($db, $filename='')

$this->methodes_trans[0] = "Internet";

$this->_fetched = 0;
$this->fetched = 0;
}

/**
Expand Down Expand Up @@ -312,7 +315,7 @@ function fetch($rowid, $ref='')

$this->statut = $obj->statut;

$this->_fetched = 1;
$this->fetched = 1;

return 1;
}
Expand Down Expand Up @@ -420,7 +423,7 @@ function set_infocredit($user, $date)

$error = 0;

if ($this->_fetched == 1)
if ($this->fetched == 1)
{
if ($date >= $this->date_trans)
{
Expand Down
3 changes: 3 additions & 0 deletions htdocs/compta/salaries/class/paymentsalary.class.php
Expand Up @@ -41,6 +41,9 @@ class PaymentSalary extends CommonObject
*/
public $table_element='payment_salary';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='payment';

public $tms;
Expand Down
35 changes: 19 additions & 16 deletions htdocs/compta/sociales/class/chargesociales.class.php
Expand Up @@ -36,33 +36,36 @@ class ChargeSociales extends CommonObject
* @var string ID to identify managed object
*/
public $element='chargesociales';

public $table='chargesociales';

/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='chargesociales';

public $picto = 'bill';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'bill';

/**
* {@inheritdoc}
*/
protected $table_ref_field = 'ref';

var $date_ech;
var $lib;
var $type;
var $type_libelle;
var $amount;
var $paye;
var $periode;
var $date_creation;
var $date_modification;
var $date_validation;
var $fk_account;
var $fk_project;
public $date_ech;
public $lib;
public $type;
public $type_libelle;
public $amount;
public $paye;
public $periode;
public $date_creation;
public $date_modification;
public $date_validation;
public $fk_account;
public $fk_project;


/**
Expand Down
Expand Up @@ -41,17 +41,22 @@ class PaymentSocialContribution extends CommonObject
*/
public $table_element='paiementcharge';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

public $fk_charge;
public $datec='';
public $tms='';
public $datep='';

/**
* @deprecated
* @see amount
*/
public $total;

public $amount; // Total amount of payment
public $amounts=array(); // Array of amounts
public $fk_typepaiement;
Expand Down
21 changes: 12 additions & 9 deletions htdocs/compta/tva/class/tva.class.php
Expand Up @@ -43,23 +43,26 @@ class Tva extends CommonObject
*/
public $table_element='tva';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='payment';

var $tms;
var $datep;
var $datev;
var $amount;
var $type_payment;
var $num_payment;
public $tms;
public $datep;
public $datev;
public $amount;
public $type_payment;
public $num_payment;

/**
* @var string label
*/
public $label;

var $fk_bank;
var $fk_user_creat;
var $fk_user_modif;
public $fk_bank;
public $fk_user_creat;
public $fk_user_modif;

/**
* Constructor
Expand Down

0 comments on commit f0dafb7

Please sign in to comment.