Skip to content
Snippets Groups Projects
Commit 7438809a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Make predefined invoice feature easier to use.

parent acf3db85
No related branches found
No related tags found
No related merge requests found
......@@ -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();
?>
?>
\ No newline at end of file
......@@ -154,4 +154,5 @@ InvoiceLinesToDispatch=Invoice lines to dispatch
InvoiceDispatched=Dispatched invoices
AccountancyDashboard=Accountancy summary
ByProductsAndServices=By products and services
RefExt=External ref
\ No newline at end of file
RefExt=External ref
ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice".
\ No newline at end of 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".
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment