Difference between revisions of "Script rebuild merge pdf.php"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Facture]]
 
[[Category:Facture]]
[[Category:Invoice]]
+
[[Category:Invoices]]
[[Category:Factura]]
+
[[Category:Facturas]]
 
[[Category:Scripts]]
 
[[Category:Scripts]]
 
= Feature/Fonction/Funcionalidad =
 
= Feature/Fonction/Funcionalidad =
{{Flag en}} This script is used to build one PDF that contains several PDF.
+
{{Flag en}} This script is used to build one PDF that contains several other PDF. You can choose rules to define which invoice PDF you include or exclude to build the merged target PDF.
  
{{Flag fr}} Ce script fabrique un fichier PDF à partir d'autres fichiers PDF.
+
{{Flag fr}} Ce script fabrique un fichier PDF à partir d'autres fichiers PDF. Vous choisissez en ligne de commande les règles pour définir quel PDF vous incluez ou excluez pour fabriquer le PDF cible.
  
{{Flag sp}} ...
+
{{Flag sp}} Este script crea un fichero PDF a partir de otros ficheros PDF.
  
 
= 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 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">
To build/merge PDF for invoices with at least one payment in a date range:
+
rebuild_merge_pdf.php
Usage:  rebuild_merge_pdf.php filter=payments dateafter datebefore [lang=langcode]
+
</source>
To build/merge PDF for invoices ina 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
Usage:  rebuild_merge_pdf.php filter=date dateafter datebefore [lang=langcode]
+
<source lang="bash">
 +
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>
 
To build/merge PDF for all invoices, use filter=all
 
To build/merge PDF for all invoices, use filter=all
Usage:  rebuild_merge_pdf.php filter=all
+
<source lang="bash">
 +
rebuild_merge_pdf.php filter=all
 +
</source>
 
To build/merge PDF for invoices with no payments, use filter=nopayment
 
To build/merge PDF for invoices with no payments, use filter=nopayment
Usage:  rebuild_merge_pdf.php filter=nopayment
+
<source lang="bash">
 +
rebuild_merge_pdf.php filter=nopayment
 +
</source>
 +
To exclude credit notes, use
 +
<source lang="bash">
 +
rebuild_merge_pdf.php filter=nocreditnote
 +
</source>
 +
To exclude replacement invoices, use
 +
<source lang="bash">
 +
rebuild_merge_pdf.php filter=noreplacement
 +
</source>
 +
To exclude deposit invoices, use
 +
<source lang="bash">
 +
rebuild_merge_pdf.php filter=nodeposit
 +
</source>
 +
To choose language for output PDF, use parameter lang=langcode
  
Example: rebuild_merge_pdf.php filter=payments 20080101 20081231 lang=fr_FR
+
 
Example: rebuild_merge_pdf.php filter=all lang=it_IT
+
Some examples:  
 +
<source lang="bash">
 +
rebuild_merge_pdf.php filter=payments 20080101 20081231 lang=fr_FR
 +
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 32: Line 68:
 
* [[Table llx_facture]]
 
* [[Table llx_facture]]
 
* [[Table llx_facturedet]]
 
* [[Table llx_facturedet]]
 +
* [[Table llx_paiement_facture]] (with option filter=payments)

Latest revision as of 07:36, 23 March 2019

Feature/Fonction/Funcionalidad

En verysmall.png This script is used to build one PDF that contains several other PDF. You can choose rules to define which invoice PDF you include or exclude to build the merged target PDF.

Fr verysmall.png Ce script fabrique un fichier PDF à partir d'autres fichiers PDF. Vous choisissez en ligne de commande les règles pour définir quel PDF vous incluez ou excluez pour fabriquer le PDF cible.

Es verysmall.png Este script crea un fichero PDF a partir de otros ficheros PDF.

Localisation/Localización

  • /dolibarr/scripts/invoices/rebuild_merge_pdf.php

Syntax/Syntaxe/Sintaxis

To run the script, go into the directory with script file and just type the php file as a command name:

rebuild_merge_pdf.php

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

php rebuild_merge_pdf.php 
/usr/bin/php-cli rebuild_merge_pdf.php


To build/merge PDF for invoices with at least one payment in a date range, use parameter filter=payments (dates should have format YYYYMMDD):

rebuild_merge_pdf.php filter=payments dateafter datebefore

To build/merge PDF for invoices in a date range (dates should have format YYYYMMDD):

rebuild_merge_pdf.php filter=date dateafter datebefore

To build/merge PDF for all invoices, use filter=all

rebuild_merge_pdf.php filter=all

To build/merge PDF for invoices with no payments, use filter=nopayment

rebuild_merge_pdf.php filter=nopayment

To exclude credit notes, use

rebuild_merge_pdf.php filter=nocreditnote

To exclude replacement invoices, use

rebuild_merge_pdf.php filter=noreplacement

To exclude deposit invoices, use

rebuild_merge_pdf.php filter=nodeposit

To choose language for output PDF, use parameter lang=langcode


Some examples:

rebuild_merge_pdf.php filter=payments 20080101 20081231 lang=fr_FR
rebuild_merge_pdf.php filter=all lang=it_IT

The merged PDF is generated in /documents/facture/temp

Tables used/Tables utilisées/Tablas utilizadas