Synchro
This commit is contained in:
parent
00e35391fd
commit
0015903197
@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT."/telephonie/pdf/pdfdetail_standard.modeles.php";
|
require_once DOL_DOCUMENT_ROOT."/telephonie/pdf/pdfdetail_standard.modeles.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/facture.class.php";
|
||||||
require_once DOL_DOCUMENT_ROOT."/telephonie/facturetel.class.php";
|
require_once DOL_DOCUMENT_ROOT."/telephonie/facturetel.class.php";
|
||||||
|
|
||||||
class pdfdetail_standard {
|
class pdfdetail_standard {
|
||||||
@ -29,25 +30,28 @@ class pdfdetail_standard {
|
|||||||
function pdfdetail_standard ($db=0, $ligne, $year, $month, $factel)
|
function pdfdetail_standard ($db=0, $ligne, $year, $month, $factel)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->description = "Modèle de facture standard";
|
$this->description = "Modèle de facture détaillée standard";
|
||||||
$this->ligne = $ligne;
|
$this->ligne = $ligne;
|
||||||
$this->year = $year;
|
$this->year = $year;
|
||||||
$this->month = $month;
|
$this->month = $month;
|
||||||
$this->factel = $factel;
|
$this->factel = $factel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
function write_pdf_file($facid, $ligne)
|
function write_pdf_file($factel, $ligne)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
$fac = new Facture($this->db,"",$facid);
|
$fac = new Facture($this->db,"",$factel->fk_facture);
|
||||||
$fac->fetch($facid);
|
$fac->fetch($factel->fk_facture);
|
||||||
$fac->fetch_client();
|
$fac->fetch_client();
|
||||||
|
|
||||||
$objlignetel = new LigneTel($this->db);
|
$objlignetel = new LigneTel($this->db);
|
||||||
$result = $objlignetel->fetch($ligne);
|
$result = $objlignetel->fetch($ligne);
|
||||||
|
|
||||||
|
|
||||||
if (defined("FAC_OUTPUTDIR"))
|
if (defined("FAC_OUTPUTDIR"))
|
||||||
{
|
{
|
||||||
$dir = FAC_OUTPUTDIR . "/" . $fac->ref . "/" ;
|
$dir = FAC_OUTPUTDIR . "/" . $fac->ref . "/" ;
|
||||||
@ -65,6 +69,7 @@ class pdfdetail_standard {
|
|||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->pdf = new pdfdetail_standard_modeles('P','mm','A4');
|
$this->pdf = new pdfdetail_standard_modeles('P','mm','A4');
|
||||||
|
|
||||||
$this->pdf->fac = $fac;
|
$this->pdf->fac = $fac;
|
||||||
@ -352,7 +357,7 @@ class pdfdetail_standard {
|
|||||||
|
|
||||||
$graph->Add($p1);
|
$graph->Add($p1);
|
||||||
|
|
||||||
$file_graph = "/tmp/graph-".$this->ligne.".jpg";
|
$file_graph = "/tmp/graph".$this->ligne.".jpg";
|
||||||
|
|
||||||
$handle = $graph->Stroke($file_graph);
|
$handle = $graph->Stroke($file_graph);
|
||||||
|
|
||||||
@ -476,6 +481,7 @@ class pdfdetail_standard {
|
|||||||
$this->pdf->Output($file);
|
$this->pdf->Output($file);
|
||||||
$this->filename = $file;
|
$this->filename = $file;
|
||||||
|
|
||||||
|
dolibarr_syslog("Write $file");
|
||||||
|
|
||||||
if(file_exists($file_graph))
|
if(file_exists($file_graph))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user