noalyss
Version-6.7.2
|
class Supplier are a specific kind of card More...
Public Member Functions | |
__construct ($p_cn, $p_id=0) | |
Constructor /* only a db connection is needed. | |
get_by_account ($p_poste=0) | |
Get all info contains in the view thanks to the poste elt (account) | |
Data Fields | |
$country | |
$cp | |
$name | |
$poste | |
$street | |
$vat_number |
class Supplier are a specific kind of card
Definition at line 36 of file class_supplier.php.
Supplier::__construct | ( | $ | p_cn, |
$ | p_id = 0 |
||
) |
Constructor /* only a db connection is needed.
Reimplemented from Fiche.
Definition at line 48 of file class_supplier.php.
{ $this->fiche_def_ref=FICHE_TYPE_FOURNISSEUR; parent::__construct($p_cn,$p_id) ; }
Supplier::get_by_account | ( | $ | p_poste = 0 | ) |
Get all info contains in the view thanks to the poste elt (account)
Definition at line 57 of file class_supplier.php.
References $Res, Fiche\$row, $sql, cn, Database\fetch_array(), name, Database\num_row(), and poste.
{ $this->poste=($p_poste==0)?$this->poste:$p_poste; $sql="select * from vw_supplier where poste_comptable=".$this->poste; $Res=$this->cn->exec_sql($sql); if ( Database::num_row($Res) == 0) return null; // There is only _one_ row by supplier $row=Database::fetch_array($Res,0); $this->name=$row['name']; $this->id=$row['f_id']; $this->street=$row['rue']; $this->cp=$row['code_postal']; $this->country=$row['pays']; $this->vat_number=$row['tva_num']; }
Supplier::$country |
$country Country
Definition at line 42 of file class_supplier.php.
Supplier::$cp |
$cp Zip code
Definition at line 43 of file class_supplier.php.
Supplier::$name |
$name name of the company
Definition at line 40 of file class_supplier.php.
Supplier::$poste |
$poste poste comptable
Definition at line 39 of file class_supplier.php.
Supplier::$street |
$street Street
Definition at line 41 of file class_supplier.php.
Supplier::$vat_number |
$vat_number vat number
Definition at line 44 of file class_supplier.php.