get_display_list(); } //Affiche le formulaire de création de livraison depuis une commande function show_from_cde($id_bibli, $id_cde) { global $msg, $charset; global $livr_modif_form, $frame_show_from_cde, $form_search, $bt_enr; $cde = new actes($id_cde); $fou = new entites($cde->num_fournisseur); $bibli = new entites($id_bibli); $exer = new exercices($cde->num_exercice); $form = $livr_modif_form; $form = str_replace('', $frame_show_from_cde, $form); $form = str_replace('', $bt_enr, $form); $form = str_replace('', $form_search, $form); $form = str_replace('!!form_title!!', htmlentities($msg['acquisition_liv_cre'], ENT_QUOTES, $charset), $form); $form = str_replace('!!id_bibli!!', $id_bibli, $form); $form = str_replace('!!lib_bibli!!', htmlentities($bibli->raison_sociale, ENT_QUOTES, $charset), $form); $form = str_replace('!!lib_exer!!', htmlentities($exer->libelle, ENT_QUOTES, $charset), $form); $form = str_replace('!!id_cde!!', $id_cde, $form); $lien_cde = "".htmlentities($cde->numero, ENT_QUOTES, $charset).""; $form = str_replace('!!num_cde!!', $lien_cde, $form); $form = str_replace('!!date_cre!!', formatdate(today()), $form); $form = str_replace('!!id_liv!!', 0, $form); $form = str_replace('!!numero!!', '', $form); $form = str_replace('!!id_fou!!', $cde->num_fournisseur, $form); $form = str_replace('!!lib_fou!!', htmlentities($fou->raison_sociale, ENT_QUOTES, $charset), $form); $form = str_replace('!!comment!!', '', $form); $form = str_replace('!!ref!!', '', $form); print $form; } //Affiche le formulaire de modification de livraison function show_form_liv($id_bibli, $id_liv) { global $msg, $charset; global $livr_modif_form, $frame_show, $bt_sup, $bt_enr, $form_search; global $pmb_type_audit, $bt_audit; $liv = new actes($id_liv); $fou = new entites($liv->num_fournisseur); $id_cde = liens_actes::getParent($id_liv); $cde = new actes($id_cde); $bibli = new entites($id_bibli); $exer = new exercices($liv->num_exercice); $form = $livr_modif_form; $form = str_replace('', $frame_show, $form); if( ($cde->statut & STA_ACT_ARC) == STA_ACT_ARC ) { //La commande est archivée donc le bl non modifiable } else { //Le bl est modifiable $form = str_replace('', $bt_sup, $form); $form = str_replace('', $bt_enr, $form); $form = str_replace('', $form_search, $form); } $form = str_replace('!!form_title!!', htmlentities($msg['acquisition_liv_mod'], ENT_QUOTES, $charset), $form); $form = str_replace('!!id_bibli!!', $id_bibli, $form); $form = str_replace('!!lib_bibli!!', htmlentities($bibli->raison_sociale, ENT_QUOTES, $charset), $form); $form = str_replace('!!lib_exer!!', htmlentities($exer->libelle, ENT_QUOTES, $charset), $form); $form = str_replace('!!id_cde!!', $id_cde, $form); $lien_cde = "".htmlentities($cde->numero, ENT_QUOTES, $charset).""; $form = str_replace('!!num_cde!!', $lien_cde, $form); $form = str_replace('!!date_cre!!', formatdate($liv->date_acte), $form); $form = str_replace('!!id_liv!!', $id_liv, $form); $form = str_replace('!!numero!!', htmlentities($liv->numero, ENT_QUOTES, $charset), $form); $form = str_replace('!!id_fou!!', $liv->num_fournisseur, $form); $form = str_replace('!!lib_fou!!', htmlentities($fou->raison_sociale, ENT_QUOTES, $charset), $form); $form = str_replace('!!comment!!', htmlentities($liv->commentaires, ENT_QUOTES, $charset), $form); $form = str_replace('!!ref!!', htmlentities($liv->reference, ENT_QUOTES, $charset), $form); if ($id_liv && $pmb_type_audit) { $form = str_replace('', $bt_audit, $form); } print $form; } //Supprime la livraison function sup_liv($id_liv, $id_cde) { $cde = new actes($id_cde); $cde->statut = ($cde->statut & (~STA_ACT_REC) | STA_ACT_ENC); //Statut commande = soldé->en cours $cde->update_statut(); actes::delete($id_liv); liens_actes::delete($id_liv); } //Traitement des actions print "