From b8141f21e0e6d5b43f61f36409f3e8f3ac240269 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 2 Jun 2006 08:53:03 +0000 Subject: [PATCH] =?UTF-8?q?Le=20fait=20de=20"class=E9=20factur=E9e"=20une?= =?UTF-8?q?=20propale=20en=20m=EAme=20temps=20qu'une=20commande=20devient?= =?UTF-8?q?=20une=20=20option=20activable=20dans=20la=20configuration=20du?= =?UTF-8?q?=20module=20propale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/propale.php | 52 ++++++++++++++++++++++++++++++ htdocs/commande/commande.class.php | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php index dbd1ea469da..3f9eb8166ac 100644 --- a/htdocs/admin/propale.php +++ b/htdocs/admin/propale.php @@ -52,6 +52,19 @@ if ($_POST["action"] == 'nbprod') exit; } +if ($_POST["action"] == 'activate_classifiedinvoiced') +{ + dolibarr_set_const($db, "PROPALE_CLASSIFIED_INVOICED_WITH_ORDER", $_POST["value"]); + Header("Location: propale.php"); + exit; +} +else if ($_POST["action"] == 'disable_classifiedinvoiced') +{ + dolibarr_del_const($db, "PROPALE_CLASSIFIED_INVOICED_WITH_ORDER"); + Header("Location: propale.php"); + exit; +} + if ($_GET["action"] == 'set') { $type='propal'; @@ -344,6 +357,45 @@ print ''; print '
'; +/* + * Classé facturée une propale en même temps que la commande + * + */ + +if ($conf->commande->enabled) +{ + print_titre($langs->trans("ClassifiedInvoiced")); + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + print ""; + print ""; + print ""; + print ''; + print ''; + print ""; + print ''; + print '
'.$langs->trans("Name").' '.$langs->trans("Active").'
'.$langs->trans("ClassifiedInvoicedWithOrder").''; + if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) + { + print img_tick(); + } + print '"; + if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 0) + { + print ''.$langs->trans("Activate").''; + } + else if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) + { + print ''.$langs->trans("Disable").''; + } + print "
'; + print ''; +} + $db->close(); llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 91cb4e1b560..0895805e1ff 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -1554,7 +1554,7 @@ class Commande $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;'; if ($this->db->query($sql) ) { - if ($this->propale_id) + if (($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) && $this->propale_id) { $propal = new Propal($this->db); $propal->fetch($this->propale_id);