Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2

This commit is contained in:
Regis Houssin 2012-05-04 13:21:50 +02:00
commit f4759a0e6e
4 changed files with 12 additions and 7 deletions

View File

@ -102,7 +102,8 @@ for (0..@ARGV-1) {
$FILENAMESNAPSHOT.="-".$PREFIX; $FILENAMESNAPSHOT.="-".$PREFIX;
} }
} }
if ($ENV{"DESTI"}) { $DESTI = $ENV{"DESTI"}; } # Force output dir if env DESTI is defined if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
print "Makepack version $VERSION\n"; print "Makepack version $VERSION\n";

View File

@ -2363,7 +2363,8 @@ class Commande extends CommonObject
$clause = " AND"; $clause = " AND";
} }
$sql.= $clause." c.entity = ".$conf->entity; $sql.= $clause." c.entity = ".$conf->entity;
$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; //$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 ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
$resql=$this->db->query($sql); $resql=$this->db->query($sql);

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
@ -108,12 +108,13 @@ if ($viewstatut <> '')
} }
if ($viewstatut == -2) // To process if ($viewstatut == -2) // To process
{ {
$sql .= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0'; //$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 ($ordermonth > 0) if ($ordermonth > 0)
{ {
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; $sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; // TODO do not use date_format but a between
} }
if ($orderyear > 0) if ($orderyear > 0)
{ {
@ -178,7 +179,7 @@ if ($resql)
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'align="right"',$sortfield,$sortorder);
print '</tr>'; print '</tr>';
// Lignes des champs de filtre // Lignes des champs de filtre
print '<form method="get" action="liste.php">'; print '<form method="get" action="liste.php">';

View File

@ -1555,8 +1555,10 @@ else
} }
else else
{ {
$forceall=1; // For suppliers, we always show all types
print $form->select_type_of_lines($object->lines[$i]->product_type,'type',1); print $form->select_type_of_lines($object->lines[$i]->product_type,'type',1);
if ($conf->product->enabled && $conf->service->enabled) print '<br>'; if ($forceall || ($conf->product->enabled && $conf->service->enabled)
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
} }
// Description - Editor wysiwyg // Description - Editor wysiwyg