From 99f8f953adf651d4a3d27d1580aa7879cc09c509 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Tue, 14 Feb 2006 11:27:50 +0000 Subject: [PATCH] ajout mode de reglement si mod facture installe --- htdocs/comm/fiche.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index ae012e9b813..c3cabdffad1 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -58,6 +58,14 @@ if ($_GET["action"] == 'attribute_prefix') $societe = new Societe($db, $_GET["socid"]); $societe->attribute_prefix($db, $_GET["socid"]); } +// mode de règlement +if ($_POST["action"] == 'setmode') +{ + $societe = new Societe($db, $_GET["socid"]); + $societe->mode_reglement=$_POST['mode_reglement_id']; + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET mode_reglement='".$_POST['mode_reglement_id']."' WHERE idp='".$socid."'"; + $result = $db->query($sql); +} if ($action == 'recontact') { @@ -321,7 +329,23 @@ if ($_socid > 0) print ''.$objsoc->price_level.""; print ''; } - + // mode de règlement + if($conf->facture->enabled) + { + $langs->load('bills'); + print ''; + print '
'; + print $langs->trans('PaymentMode'); + print ''; + print ' '; + print '
'; + print ''; + $html = new Form($db); + $html->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->mode_reglement,'mode_reglement_id'); + print ""; + print ''; + } + print ""; print "\n";