Make predefined invoice feature easier to use.

This commit is contained in:
Laurent Destailleur 2013-08-06 23:55:17 +02:00
parent acf3db8512
commit 7438809ab5
3 changed files with 12 additions and 10 deletions

View File

@ -521,7 +521,6 @@ else
/*
* List mode
*/
$sql = "SELECT s.nom, s.rowid as socid, f.titre, f.total, f.rowid as facid";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
$sql.= " WHERE f.fk_soc = s.rowid";
@ -531,13 +530,14 @@ else
//$sql .= " ORDER BY $sortfield $sortorder, rowid DESC ";
// $sql .= $db->plimit($limit + 1,$offset);
$result = $db->query($sql);
if ($result)
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($result);
$num = $db->num_rows($resql);
print_barre_liste($langs->trans("RepeatableInvoices"),$page,$_SERVER['PHP_SELF'],"&socid=$socid",$sortfield,$sortorder,'',$num);
print $langs->trans("ToCreateAPredefinedInvoice").'<br><br>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -552,7 +552,7 @@ else
$var=True;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($result);
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr ".$bc[$var].">";
@ -586,9 +586,10 @@ else
$i++;
}
}
else print '<tr><td>'.$langs->trans("NoneF").'</td></tr>';
print "</table>";
$db->free();
$db->free($resql);
}
else
{
@ -601,5 +602,4 @@ else
llxFooter();
$db->close();
?>
?>

View File

@ -154,4 +154,5 @@ InvoiceLinesToDispatch=Invoice lines to dispatch
InvoiceDispatched=Dispatched invoices
AccountancyDashboard=Accountancy summary
ByProductsAndServices=By products and services
RefExt=External ref
RefExt=External ref
ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice".

View File

@ -155,3 +155,4 @@ InvoiceDispatched=Factures ventilées
AccountancyDashboard=Synthèse compta/tréso
ByProductsAndServices=Par produits et services
RefExt=Référence externe
ToCreateAPredefinedInvoice=Pour créer une facture prédéfinie, créer une facture standard puis sans la valider, cliquer sur le bouton "Convertir en facture prédéfine".