diff --git a/ChangeLog b/ChangeLog
index c7d0cd19192..191cc035520 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,9 +49,9 @@ For users:
- New: Add a selection module for emailing to enter a recipient from gui.
- New: Allow to search thirds and products from barcodes directly from the permanent mini search left box.
- New: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
+- New: Can make one invoice for several orders.
New experimental modules:
- New: Add margin and commissions management module.
-- New: Add holiday module.
- Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index ee3f627f073..4415fb05229 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -2529,10 +2529,10 @@ class Commande extends CommonOrder
* Return clicable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
- * @param int $option Where point the link
+ * @param int $option Where point the link (0=> main card, 1,2 => shipment)
* @param int $max Max length to show
* @param int $short Use short labels
- * @return string String with URL
+ * @return string String with URL
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index b3ea2328866..1a8afa7fef5 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -126,7 +126,7 @@ if ($sall)
}
if ($viewstatut <> '')
{
- if ($viewstatut < 4 && $viewstatut > -2)
+ if ($viewstatut < 4 && $viewstatut > -3)
{
$sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
if ($viewstatut == 3)
@@ -143,6 +143,11 @@ if ($viewstatut <> '')
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
}
+ if ($viewstatut == -3) // To bill
+ {
+ $sql.= ' AND c.fk_statut in (1,2,3)';
+ $sql.= ' AND c.facture = 0'; // invoice not created
+ }
}
if ($ordermonth > 0)
{
@@ -215,6 +220,8 @@ if ($resql)
$title.=' - '.$langs->trans('StatusOrderCanceledShort');
if ($viewstatut == -2)
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
+ if ($viewstatut == -3)
+ $title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
@@ -233,6 +240,7 @@ if ($resql)
// Lignes des champs de filtre
print '