mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-17 15:01:26 +01:00
*** empty log message ***
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2000,2001 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2000,2001 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,8 +15,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*/
|
*
|
||||||
/*
|
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
*
|
||||||
@@ -56,6 +52,20 @@ function print_barre_liste($titre,$page,$file) {
|
|||||||
print '<a href="'.$file.'?page='.($page+1).'"><img alt="Page suivante" src="/theme/'.$conf->theme.'/img/1rightarrow.png" border="0"></a>';
|
print '<a href="'.$file.'?page='.($page+1).'"><img alt="Page suivante" src="/theme/'.$conf->theme.'/img/1rightarrow.png" border="0"></a>';
|
||||||
print '</td></tr></table><p>';
|
print '</td></tr></table><p>';
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function print_oui_non($value) {
|
||||||
|
if ($value) {
|
||||||
|
print '<option value="0">non';
|
||||||
|
print '<option value="1" selected>oui';
|
||||||
|
} else {
|
||||||
|
print '<option value="0" selected>non';
|
||||||
|
print '<option value="1">oui';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ if ($action == 'update') {
|
|||||||
$soc->fax = $fax;
|
$soc->fax = $fax;
|
||||||
$soc->url = $url;
|
$soc->url = $url;
|
||||||
$soc->siren = $siren;
|
$soc->siren = $siren;
|
||||||
|
$soc->client = $client;
|
||||||
|
$soc->fournisseur = $fournisseur;
|
||||||
|
|
||||||
$soc->update($socid);
|
$soc->update($socid);
|
||||||
}
|
}
|
||||||
@@ -124,10 +126,12 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print '<tr><td>Siren</td><td><input type="text" name="siren" value="'.$soc->siren.'"></td></tr>';
|
print '<tr><td>Siren</td><td><input type="text" name="siren" value="'.$soc->siren.'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>Type</td><td><select name="type">';
|
print '<tr><td>Client</td><td><select name="client">';
|
||||||
|
print_oui_non($soc->client);
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
|
||||||
print '<tr><td>Effectif</td><td><select name="effectif">';
|
print '<tr><td>Fournisseur</td><td><select name="fournisseur">';
|
||||||
|
print_oui_non($soc->fournisseur);
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
* Classe Company
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,6 +15,11 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
|
* $Id$
|
||||||
|
* $Source$
|
||||||
|
*
|
||||||
|
* Classe Company
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Societe {
|
class Societe {
|
||||||
@@ -67,6 +68,13 @@ class Societe {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Function update($id) {
|
Function update($id) {
|
||||||
|
/*
|
||||||
|
* Force au statut de fournisseur si ce n'est pas un client
|
||||||
|
* sinon l'entreprise disparait de toutes les listes
|
||||||
|
*/
|
||||||
|
if ($this->client == 0 ) {
|
||||||
|
$this->fournisseur = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "UPDATE societe ";
|
$sql = "UPDATE societe ";
|
||||||
$sql .= " SET nom = '" . trim($this->nom) ."'";
|
$sql .= " SET nom = '" . trim($this->nom) ."'";
|
||||||
@@ -77,6 +85,8 @@ class Societe {
|
|||||||
$sql .= ",fax = '" . trim($this->fax) ."'";
|
$sql .= ",fax = '" . trim($this->fax) ."'";
|
||||||
$sql .= ",url = '" . trim($this->url) ."'";
|
$sql .= ",url = '" . trim($this->url) ."'";
|
||||||
$sql .= ",siren = '" . trim($this->siren) ."'";
|
$sql .= ",siren = '" . trim($this->siren) ."'";
|
||||||
|
$sql .= ",client = " . $this->client ;
|
||||||
|
$sql .= ",fournisseur = " . $this->fournisseur ;
|
||||||
$sql .= " WHERE idp = " . $id;
|
$sql .= " WHERE idp = " . $id;
|
||||||
|
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user