From be395afb80f6c3835ff30ac36bcf0465ed7ddf2b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 13 Jun 2011 15:41:47 +0000 Subject: [PATCH] Works on shipping module enhancement --- htdocs/compta/facture.php | 1 + htdocs/expedition/fiche.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 433d6dfa6da..023f4accce2 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1434,6 +1434,7 @@ if ($action == 'create') if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } if ($element == 'contract') { $element = $subelement = 'contrat'; } + if ($element == 'shipping') { $element = $subelement = 'expedition'; } dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 8e3683c89dd..aa249ba3e39 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1258,6 +1258,23 @@ else else print ''.$langs->trans('SendByMail').''; } } + + // Create bill and Classify billed + if ($conf->facture->enabled && $object->statut > 0 && ! $object->billed) + { + if ($user->rights->facture->creer) + { + // TODO until the module is autonomous + //print ''.$langs->trans("CreateBill").''; + print ''.$langs->trans("CreateBill").''; + } + + // TODO add alternative status + if ($user->rights->expedition->creer && $object->statut > 2) + { + print ''.$langs->trans("ClassifyBilled").''; + } + } if ($conf->livraison_bon->enabled && $object->statut == 1 && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds)) {