back to knowledgebase

How to create a Stock Fund PDF Template

Updated: 17 May 2022 20:09:41 OpenCRM::Settings::Templates OpenCRM::Companies

If you want to send out Stock Fund statements to your customers, this FAQ will walk you through creating and using a basic template.

Enable the Stock Fund feature

The first thing you need to do is enable to Stock Fund feature as you will not be able to create a PDF template without this turned on.

Go to Settings > Additional Settings > Stock Fund Settings, tick the Enable Stock fund feature... box and Save

You will then need to decide which Product you want to use to replenish Stock and which Invoice statuses will NOT deduct stock. This final setting is optional, but will allow you to set a default subject for those that have been credit funded that is added in place of the Invoice Subject on the PDF.

Create your PDF Template 

Go to Settings > Communication Templates > PDF Templates. Holding your mouse over the New Quote Template green action button gives you a drop down list - choose New Company Template. Give your template a name that identifies it clearly, for example "Stock Fund Template". The goal here is to ensure that when you are selecting the template to use in an export or an email, you will be able to identify which one is your stock fund template. 

Setting up the Template for Stock Fund Statements

In the Template Settings section, there is a dropdown field for Show Linked Detail - select Stock Fund.  This option will only be available if you have enabled the Stock Fund feature in Additional Settings as outlined above.

Once this is selected, a number of column options will be displayed below PDF Header allowing you to drag and drop the columns you'd like to appear on your statement. We recommend that you use the following columns on your template:

  1. Stock_before shows the balance of the fund before the addition/deduction of funds​
  2. Stock_removed shows the amount that was removed or added through a top up.  
  3. Remaining_stock shows the amount in the fund after the deduction or the top up.
  4. outstanding shows the amount that was owed on the invoice in the case of partial credit funding - that is, if a client has 5 in their credit fund and the invoice is for 10, then the outstanding column would list 5 as the amount that was due after the credit fund deduction was applied. 
  5. datetime shows the date that the sales order was made
  6. invoice_date shows the date that the invoice was made - this date will be blank for a credit fund top up as these don't go to invoice. 

In order to identify these transactions for your customer, it would also be wise to include a Subject column and use descriptive subjects that identify a top up or purchase. 

Step 4: Filters

Note that on a Stock Fund PDF template, your filtering options are limited to a date range. This filter can be found above the PDF Header under Statement Options, a field called 'Invoice Period' with a drop down that contains various date ranges. 

Additional Options 

If you would like to see credit fund deductions in red, and top ups in black - add the following code to your PDF Header.  Do this by clicking the downward arrow at the top right of the PDF Header box, and clicking the 'Source' button at the top right of the new options.  Copy and paste but remove the spaces between < and the text that follows (this space is only added so that the code will appear properly in this FAQ). 

< style type="text/css">
table tr.StockFundNegative td.stock_removed {
    color: red; font-weight: bold;
}
< /style>

On saving the template, the next time you export or email a statement using this template the deductions will show in red. 

Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  


You may also be interested in: