Line 11:
Line 11:
= Localisation/Localización =
= Localisation/Localización =
−
* /dolibarr/htdocs/scripts/invoices/rebuild_merge_pdf.php
+
* /dolibarr/scripts/invoices/rebuild_merge_pdf.php
= Syntax/Syntaxe/Sintaxis =
= Syntax/Syntaxe/Sintaxis =
−
To build/merge PDF for invoices with at least one payment in a date range, use parameter filter=payments:
+
To run the script, go into the directory with script file and just type the php file as a command name:
<source lang="bash">
<source lang="bash">
−
rebuild_merge_pdf.php filter=payments dateafter datebefore [lang=langcode]
+
rebuild_merge_pdf.php
</source>
</source>
−
To build/merge PDF for invoices in a date range:
+
If you get an error "File not found" or "Permission denied", try to launch the command by adding php or php-cli (with or without full path of php command) before the script name
<source lang="bash">
<source lang="bash">
−
rebuild_merge_pdf.php filter=date dateafter datebefore [lang=langcode]
+
php rebuild_merge_pdf.php
+
/usr/bin/php-cli rebuild_merge_pdf.php
+
</source>
+
+
+
To build/merge PDF for invoices with at least one payment in a date range, use parameter filter=payments (dates should have format YYYYMMDD):
+
<source lang="bash">
+
rebuild_merge_pdf.php filter=payments dateafter datebefore
+
</source>
+
To build/merge PDF for invoices in a date range (dates should have format YYYYMMDD):
+
<source lang="bash">
+
rebuild_merge_pdf.php filter=date dateafter datebefore
</source>
</source>
To build/merge PDF for all invoices, use filter=all
To build/merge PDF for all invoices, use filter=all
Line 42:
Line 53:
rebuild_merge_pdf.php filter=nodeposit
rebuild_merge_pdf.php filter=nodeposit
</source>
</source>
+
To choose language for output PDF, use parameter lang=langcode
+
−
Example:
+
Some examples:
<source lang="bash">
<source lang="bash">
rebuild_merge_pdf.php filter=payments 20080101 20081231 lang=fr_FR
rebuild_merge_pdf.php filter=payments 20080101 20081231 lang=fr_FR
rebuild_merge_pdf.php filter=all lang=it_IT
rebuild_merge_pdf.php filter=all lang=it_IT
</source>
</source>
+
+
The merged PDF is generated in /documents/facture/temp
= Tables used/Tables utilisées/Tablas utilizadas =
= Tables used/Tables utilisées/Tablas utilizadas =
Line 53:
Line 68:
* [[Table llx_facture]]
* [[Table llx_facture]]
* [[Table llx_facturedet]]
* [[Table llx_facturedet]]
+
* [[Table llx_paiement_facture]] (with option filter=payments)