From 8a8a7d3c42c341ab52a9f7911fcc2910c5bb50d1 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 10 Sep 2010 16:51:33 +0000 Subject: [PATCH] Test: removal of the tab "accountancy card" --- htdocs/comm/propal.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 4f043a1dcc5..fd01113de6c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -360,6 +360,13 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) } } +// Classify billed +if ($_GET["action"] == 'classifybilled') +{ + $propal->fetch($_GET["id"]); + $propal->cloture($user, 4, ''); +} + /* * Cloture de la propale */ @@ -1469,6 +1476,21 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans('SendByMail').''; } } + + // Create an invoice and classify billed + if ($conf->facture->enabled && $propal->statut == 2 && $user->societe_id == 0) + { + if ($user->rights->facture->creer) + { + print ''.$langs->trans("BuildBill").''; + } + + $arraypropal=$propal->getInvoiceArrayList(); + if (is_array($arraypropal) && sizeof($arraypropal) > 0) + { + print 'socid.'">'.$langs->trans("ClassifyBilled").''; + } + } // Close if ($propal->statut == 1 && $user->rights->propale->cloturer) @@ -1484,7 +1506,7 @@ if ($id > 0 || ! empty($ref)) } // Delete - if ($user->rights->propale->supprimer) + if ($propal->statut < 4 && $user->rights->propale->supprimer) { print ''.$langs->trans('Delete').'';