103 |
|
|
104 |
} |
} |
105 |
|
|
|
function create_commande($user) |
|
|
{ |
|
|
$result = -1; |
|
|
dolibarr_syslog("Fournisseur::Create_Commande"); |
|
|
$comm = new CommandeFournisseur($this->db); |
|
|
$comm->soc_id = $this->id; |
|
|
|
|
|
if ( $comm->create($user) == 0 ) |
|
|
{ |
|
|
dolibarr_syslog("Fournisseur::Create_Commande : Success"); |
|
106 |
|
|
107 |
$this->single_open_commande = $comm->id; |
/** |
108 |
|
* \brief Créé la commande au statut brouillon |
109 |
|
* \param user Utilisateur qui crée |
110 |
|
* \return int <0 si ko, id de la commande créée si ok |
111 |
|
*/ |
112 |
|
function create_commande($user) |
113 |
|
{ |
114 |
|
dolibarr_syslog("Fournisseur::Create_Commande"); |
115 |
|
$comm = new CommandeFournisseur($this->db); |
116 |
|
$comm->soc_id = $this->id; |
117 |
|
|
118 |
|
if ($comm->create($user) > 0) |
119 |
|
{ |
120 |
|
dolibarr_syslog("Fournisseur::Create_Commande : Success"); |
121 |
|
$this->single_open_commande = $comm->id; |
122 |
|
|
123 |
|
return $comm->id; |
124 |
|
} |
125 |
|
else |
126 |
|
{ |
127 |
|
dolibarr_syslog("Fournisseur::Create_Commande : Failed"); |
128 |
|
return -1; |
129 |
|
} |
130 |
|
} |
131 |
|
|
|
$result = 0; |
|
|
} |
|
|
else |
|
|
{ |
|
|
dolibarr_syslog("Fournisseur::Create_Commande : Failed"); |
|
|
$result = -2; |
|
|
} |
|
|
|
|
|
return $result; |
|
|
} |
|
132 |
|
|
133 |
function ProductCommande($user, $product_id) |
function ProductCommande($user, $product_id) |
134 |
{ |
{ |