Bug 16486: Display the timestamp when an accountline is updated
[srvgit] / installer / data / mysql / fr-CA / obligatoire / sample_notices.sql
index 3ea07e3..0296c20 100644 (file)
@@ -17,7 +17,7 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m
 ('reserves','HOLD','','Réservation en attente de retrait',0,'Réservation en attente de retrait à <<branches.branchname>>','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVotre réservation est disponible depuis le <<reserves.waitingdate>> :\r\n\r\nTitre : <<biblio.title>>\r\nAuteur : <<biblio.author>>\r\nCopie : <<items.copynumber>>\r\nLocalisation : <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>\r\n\r\nNous vous invitons à venir emprunter votre document rapidement.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
 ('reserves','HOLD','','Réservation en attente de retrait',0,'Réservation en attente de retrait à <<branches.branchname>>','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVotre réservation est disponible depuis le <<reserves.waitingdate>> :\r\n\r\nTitre : <<biblio.title>>\r\nAuteur : <<biblio.author>>\r\nCopie : <<items.copynumber>>\r\nLocalisation : <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>\r\n\r\nNous vous invitons à venir emprunter votre document rapidement.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','print'),
 ('reserves','HOLDPLACED','','Réservation sur un document',0,'Un document a été réservé','Le document suivant a été réservé : \r\n<<biblio.title>> (<<biblio.biblionumber>>) par l\'adhérent <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).','email'),
-('reserves','HOLD_REMINDER','','Waiting hold reminder',0,'You have waiting holds.','Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nThe follwing holds are waiting at [% branch.branchname %]:\r\n\\r\n[% FOREACH hold IN holds %]\r\n    [% hold.biblio.title %] : waiting since [% hold.waitingdate | $KohaDates %]\r\n[% END %]','email'),
+('reserves','HOLD_REMINDER','','Waiting hold reminder',0,'You have waiting holds.','Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nThe following holds are waiting at [% branch.branchname %]:\r\n\\r\n[% FOREACH hold IN holds %]\r\n    [% hold.biblio.title %] : waiting since [% hold.waitingdate | $KohaDates %]\r\n[% END %]','email'),
 ('reserves', 'CANCEL_HOLD_ON_LOST', '','Réservation annulée',0,"Réservation annulée", "Bonjour [% borrower.firstname %] [% borrower.surname %],\n\nVotre réservation pour le document suivant ne peut malheureusement pas être comblée parce que le document est introuvable.\n\nTitre : [% biblio.title %]\nAuteur : [% biblio.author %]\nExemplaire : [% item.copynumber %]\nLocalisation : [% branch.branchname %]", 'email'),
 ('serial','SERIAL_ALERT','','Liste de circulation',0,'Le nouveau numéro de <<biblio.title>> est disponible','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nLe nouveau numéro de <<biblio.title>> est disponible.\r\n\r\nVous pouvez venir à la bilbliothèque pour le consulter.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
 ('suggestions','ACCEPTED','','Suggestion d\'achat acceptée',0,'Suggestion d\'achat acceptée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourdhui. Le document sera commandé dès que possible. Vous serez tenu au courant par courriel quand le document aura été commandé et quand il sera disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
@@ -110,108 +110,123 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`
 ('circulation', 'ACCOUNT_WRITEOFF', '', 'Amnistie', 0, 'Amnistie', '[%- USE Price -%]\r\nNous avons accordé une amnistie de [% credit.amount * -1 | $Price %] à votre compte.\r\n\r\nLes frais suivants ont été amnistiés :\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nMontant payé : [% o.amount * -1 | $Price %]\r\nMontant en souffrance : [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default');
 
 INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
-('circulation', 'ACCOUNT_CREDIT', '', 'Confirmation de paiement', 0, 'Confirmation de paiement', '<table>
+('circulation', 'ACCOUNT_CREDIT', '', 'Confirmation de paiement', 0, 'Confirmation de paiement', '[% USE Price %]
+[% PROCESS \"accounts.inc\" %]
+<table>
 [% IF ( LibraryName ) %]
  <tr>
-    <th colspan="4" class="centerednames">
+    <th colspan=\"5\" class=\"centerednames\">
         <h3>[% LibraryName | html %]</h3>
     </th>
  </tr>
 [% END %]
  <tr>
-    <th colspan="4" class="centerednames">
-        <h2><u>REÇU</u></h2>
+    <th colspan=\"5\" class=\"centerednames\">
+        <h2><u>Fee receipt</u></h2>
     </th>
  </tr>
  <tr>
-    <th colspan="4" class="centerednames">
-        <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
+    <th colspan=\"5\" class=\"centerednames\">
+        <h2>[% Branches.GetName( credit.patron.branchcode ) | html %]</h2>
     </th>
  </tr>
  <tr>
-    <th colspan="4">
-        Reçu de [% patron.firstname | html %] [% patron.surname | html %] <br />
-        Numéro de carte : [% patron.cardnumber | html %]<br />
+    <th colspan=\"5\">
+        Received with thanks from  [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br />
+        Card number: [% credit.patron.cardnumber | html %]<br />
     </th>
  </tr>
   <tr>
-    <th>Date</th>
-    <th>Description des frais</th>
+    <th>Created</th>
+    <th>Updated</th>
+    <th>Description of charges</th>
     <th>Note</th>
-    <th>Montant</th>
+    <th>Amount</th>
  </tr>
 
-  [% FOREACH account IN accounts %]
-    <tr class="highlight">
-      <td>[% account.date | $KohaDates %]</td>
-      <td>
-        [% PROCESS account_type_description account=account %]
-        [%- IF account.description %], [% account.description | html %][% END %]
-      </td>
-      <td>[% account.note | html %]</td>
-      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
-    </tr>
+ <tr class=\"highlight\">
+    <td>[% credit.date | $KohaDates %]</td>
+    <td>[% credit.timestamp | $KohaDates with_hours = 1 %]</td>
+    <td>
+      [% PROCESS account_type_description account=credit %]
+      [%- IF credit.description %], [% credit.description | html %][% END %]
+    </td>
+    <td>[% credit.note | html %]</td>
+    <td class=\"credit\">[% credit.amount | $Price %]</td>
+ </tr>
+
+[% IF ( tendered ) %]
+  <tr>
+    <td colspan=\"3\">Amount tendered: </td>
+    <td>[% tendered | $Price %]</td>
+  </tr>
+  <tr>
+    <td colspan=\"3\">Change given: </td>
+    <td>[% change | $Price %]</td>
+  </tr>
+[% END %]
 
-  [% END %]
 <tfoot>
   <tr>
-    <td colspan="3">Solde non-réglé : </td>
-    [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
+    <td colspan=\"4\">Total outstanding dues as on date: </td>
+    [% IF ( credit.patron.account.balance >= 0 ) %]<td class=\"credit\">[% ELSE %]<td class=\"debit\">[% END %][% credit.patron.account.balance | $Price %]</td>
   </tr>
 </tfoot>
 </table>', 'print', 'default');
 
 INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES
-('circulation', 'ACCOUNT_DEBIT', '', 'Account fee', 0, 'Account fee', '<table>
+('circulation', 'ACCOUNT_DEBIT', '', 'Account fee', 0, 'Account fee', '[% USE Price %]
+[% PROCESS \"accounts.inc\" %]
+<table>
   [% IF ( LibraryName ) %]
     <tr>
-      <th colspan="5" class="centerednames">
+      <th colspan=\"6\" class=\"centerednames\">
         <h3>[% LibraryName | html %]</h3>
       </th>
     </tr>
   [% END %]
 
   <tr>
-    <th colspan="5" class="centerednames">
-      <h2><u>FACTURE</u></h2>
+    <th colspan=\"6\" class=\"centerednames\">
+      <h2><u>INVOICE</u></h2>
     </th>
   </tr>
   <tr>
-    <th colspan="5" class="centerednames">
-      <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
+    <th colspan=\"6\" class=\"centerednames\">
+      <h2>[% Branches.GetName( debit.patron.branchcode ) | html %]</h2>
     </th>
   </tr>
   <tr>
-    <th colspan="5" >
-      Facturé à : [% patron.firstname | html %] [% patron.surname | html %] <br />
-      Numéro de carte : [% patron.cardnumber | html %]<br />
+    <th colspan=\"6\" >
+      Bill to: [% debit.patron.firstname | html %] [% debit.patron.surname | html %] <br />
+      Card number: [% debit.patron.cardnumber | html %]<br />
     </th>
   </tr>
   <tr>
-    <th>Date</th>
-    <th>Description des frais</th>
+    <th>Created</th>
+    <th>Updated</th>
+    <th>Description of charges</th>
     <th>Note</th>
-    <th style="text-align:right;">Montant</th>
-    <th style="text-align:right;">Solde</th>
+    <th style=\"text-align:right;\">Amount</th>
+    <th style=\"text-align:right;\">Amount outstanding</th>
   </tr>
 
-  [% FOREACH account IN accounts %]
-    <tr class="highlight">
-      <td>[% account.date | $KohaDates%]</td>
-      <td>
-        [% PROCESS account_type_description account=account %]
-        [%- IF account.description %], [% account.description | html %][% END %]
-      </td>
-      <td>[% account.note | html %]</td>
-      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
-      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
-    </tr>
-  [% END %]
+  <tr class=\"highlight\">
+    <td>[% debit.date | $KohaDates%]</td>
+    <td>[% debit.timestamp | $KohaDates with_hours = 1 %]</td>
+    <td>
+      [% PROCESS account_type_description account=debit %]
+      [%- IF debit.description %], [% debit.description | html %][% END %]
+    </td>
+    <td>[% debit.note | html %]</td>
+    <td class=\"debit\">[% debit.amount | $Price %]</td>
+    <td class=\"debit\">[% debit.amountoutstanding | $Price %]</td>
+  </tr>
 
   <tfoot>
     <tr>
-      <td colspan="4">Solde non-réglé : </td>
-      [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
+      <td colspan=\"5\">Total outstanding dues as on date: </td>
+      [% IF ( debit.patron.account.balance <= 0 ) %]<td class=\"credit\">[% ELSE %]<td class=\"debit\">[% END %][% debit.patron.account.balance | $Price %]</td>
     </tr>
   </tfoot>
 </table>', 'print', 'default');