diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 3b6f90ff8c6..1eff844cc21 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -77,6 +77,14 @@ if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer) $result=$commande->cond_reglement($_POST['cond_reglement_id']); } +// mode de reglement +if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) +{ + $commande = new CommandeFournisseur($db); + $commande->fetch($id); + $result=$commande->mode_reglement($_POST['mode_reglement_id']); +} + // Set project if ($action == 'classin') { @@ -969,6 +977,24 @@ if ($id > 0 || ! empty($ref)) } print ""; print ''; + + // Mode of payment + print ''; + print ''; + if ($_GET['action'] != 'editmode' && $object->brouillon) print ''; + print '
'; + print $langs->trans('PaymentMode'); + print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; + print ''; + if ($_GET['action'] == 'editmode') + { + $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'mode_reglement_id'); + } + else + { + $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->mode_reglement_id,'none'); + } + print ''; // Project if ($conf->projet->enabled)