From ccdbf69cd58edcd8833adcde76687d0ec00682e6 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sun, 24 Apr 2016 18:11:19 +0200
Subject: [PATCH] Bette explanation on how to create an repeatable invoice

---
 htdocs/compta/facture.php           | 9 +++++++++
 htdocs/compta/facture/fiche-rec.php | 2 +-
 htdocs/langs/en_US/bills.lang       | 1 +
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index a27f13cbb77..95ddde4719f 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2329,6 +2329,15 @@ if ($action == 'create')
 		}
 	}
 
+	// Template invoice
+	print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
+	$tmp='<input type="radio" name="type" id="radio_template" value="0" disabled> ';
+	$text = $tmp.$langs->trans("RepeatableInvoice") . ' ';
+	//$text.= '('.$langs->trans("YouMustCreateStandardInvoiceFirst").') ';
+	$desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3);
+	print $desc;
+	print '</div></div>';
+	
 	print '</div>';
 
 	print '</td></tr>';
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 275724d3012..7f4c5282098 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -1089,7 +1089,7 @@ else
 					$i++;
 				}
 			}
-			else print '<tr '.$bc[false].'><td colspan="6">'.$langs->trans("NoneF").'</td></tr>';
+			else print '<tr '.$bc[false].'><td colspan="9">'.$langs->trans("NoneF").'</td></tr>';
 
 			print "</table>";
 			$db->free($resql);
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 04b7a6ecb33..7b6604dce51 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -433,6 +433,7 @@ ListOfYourUnpaidInvoices=List of unpaid invoices
 NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative.
 RevenueStamp=Revenue stamp
 YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty
+YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice first and convert it to "template" to create a new template invoice
 PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template)
 PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for invoice situation
 TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
-- 
GitLab