Jump to content

Add download link for invoices


anjali

Recommended Posts

Hi,

 

you could replace the final <div> block in clientareainvoices.tpl with the following...

 

<div class="table-container clearfix">
   <table id="tableInvoicesList" class="table table-list">
       <thead>
           <tr>
               <th>{$LANG.invoicesdownload}</th>
               <th>{$LANG.invoicestitle}</th>
               <th>{$LANG.invoicesdatecreated}</th>
               <th>{$LANG.invoicesdatedue}</th>
               <th>{$LANG.invoicestotal}</th>
               <th>{$LANG.invoicesstatus}</th>
               <th class="responsive-edit-button" style="display: none;"></th>
           </tr>
       </thead>
       <tbody>
           {foreach key=num item=invoice from=$invoices}
               <tr onclick="clickableSafeRedirect(event, 'viewinvoice.php?id={$invoice.id}', false)">
                   <td><a href="dl.php?type=i&id={$invoice.id}">{$LANG.quotedlpdfbtn}</a></td>
                   <td>{$invoice.invoicenum}</td>
                   <td><span class="hidden">{$invoice.normalisedDateCreated}</span>{$invoice.datecreated}</td>
                   <td><span class="hidden">{$invoice.normalisedDateDue}</span>{$invoice.datedue}</td>
                   <td>{$invoice.total}</td>
                   <td><span class="label status status-{$invoice.statusClass}">{$invoice.status}</span></td>
                   <td class="responsive-edit-button" style="display: none;">
                       <a href="viewinvoice.php?id={$invoice.id}" class="btn btn-block btn-info">
                           {$LANG.manageproduct}
                       </a>
                   </td>
               </tr>
           {/foreach}
       </tbody>
   </table>
</div>

i've only added two lines - a column heading, which in English will say "Download"; and the download link itself, which will say "Download PDF" - both use existing language entries.

 

if you don't want to use text for the download links, then you could use a pdf logo instead - by changing the column heading to "PDF" and using the exiting pdf logo from the assets/img folder.

 

<div class="table-container clearfix">
   <table id="tableInvoicesList" class="table table-list">
       <thead>
           <tr>
               <th>PDF</th>
               <th>{$LANG.invoicestitle}</th>
               <th>{$LANG.invoicesdatecreated}</th>
               <th>{$LANG.invoicesdatedue}</th>
               <th>{$LANG.invoicestotal}</th>
               <th>{$LANG.invoicesstatus}</th>
               <th class="responsive-edit-button" style="display: none;"></th>
           </tr>
       </thead>
       <tbody>
           {foreach key=num item=invoice from=$invoices}
               <tr onclick="clickableSafeRedirect(event, 'viewinvoice.php?id={$invoice.id}', false)">
                   <td><a href="dl.php?type=i&id={$invoice.id}"><img src="{$BASE_PATH_IMG}/pdf.png" alt="{$LANG.quotedlpdfbtn}" /></a></td>
                   <td>{$invoice.invoicenum}</td>
                   <td><span class="hidden">{$invoice.normalisedDateCreated}</span>{$invoice.datecreated}</td>
                   <td><span class="hidden">{$invoice.normalisedDateDue}</span>{$invoice.datedue}</td>
                   <td>{$invoice.total}</td>
                   <td><span class="label status status-{$invoice.statusClass}">{$invoice.status}</span></td>
                   <td class="responsive-edit-button" style="display: none;">
                       <a href="viewinvoice.php?id={$invoice.id}" class="btn btn-block btn-info">
                           {$LANG.manageproduct}
                       </a>
                   </td>
               </tr>
           {/foreach}
       </tbody>
   </table>
</div>

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated