Quantcast
Channel: Dolibarr Forum :: Recent Topics
Viewing all articles
Browse latest Browse all 2984

Theresa | Expense Report PDF Model - by: aljawaid

$
0
0
Theresa - An Alternative Expense Report PDF Document Model

WARNING:
This information and code is presented to you in good faith. Using parts of this code or file is at your own risk. This feature has been tested on Dolibarr 7.0.4 and 8.0.2 .


What this does
Upto Dolibarr 8.0 the 'standard' expense report PDF model followed the typical invoice-style layout. With Dolibarr 9.0 a new improved layout was created for the 'standard' model which tackled reducing the columns and blank pages.

The 'theresa' model is focussed on a business expense usage, as opposed to a user expense usage. Model 'theresa' is based on the improved 'standard' model but with the following changes:
  • Added payment table to PDF
  • Amount paid/claimed/unpaid is only shown when unpaid
  • Add PDF Description and Author *
  • Only show payments on PDF if there is a payment.
  • Hidden config MAIN_GENERATE_NON_SALES_DOCUMENTS_WITHOUT_VAT to make sales doc vat different from internal docs
  • Page table titles in bold and aligned
  • Changed the overall text color to black for paper printing
  • Highlighted date (in bold) for easier reference
  • Changed the status color to a paper-friendly green
  • Changed the 'Amount in' to italics
  • Aligned columns
* Requires new translation string


What the PDF looks like

Here's the general look...
[File Attachment: theresa-no-payment.png]



Here's with the payment table...
[File Attachment: theresa-payment-table.png]


Here's the unpaid section...
[File Attachment: theresa-unpaid.png]


Upload the document model
EXTRACT and upload to:


This file:



Add the translation text
In file:


Add: (around line 39)



Activate the document model
Finally in Dolibarr, go to: Home ► Setup ► Modules ► Expense Reports

[File Attachment: theresa-status.png]

Viewing all articles
Browse latest Browse all 2984

Trending Articles