diff --git a/htdocs/compta/export/modules/compta.export.safran.class.php b/htdocs/compta/export/modules/compta.export.safran.class.php index 6ad9f2cdc1c..783550581b0 100644 --- a/htdocs/compta/export/modules/compta.export.safran.class.php +++ b/htdocs/compta/export/modules/compta.export.safran.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2006 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,42 +26,43 @@ require_once(PHP_WRITEEXCEL_PATH."/class.writeexcel_worksheet.inc.php"); class ComptaExportTableur extends ComptaExport { - function ComptaExportTableur () + function ComptaExportTableur () + { + + } + + function Create() { - - } - - function Create() - { - - $this->date = time(); - - $this->datef = "commande-".strftime("%d%b%y-%HH%M", $this->date); - - $fname = DOL_DATA_ROOT ."/telephonie/ligne/commande/".$this->datef.".xls"; - - if (strlen(trim($this->fournisseur->email_commande)) == 0) + + $this->date = time(); + + $this->datef = "commande-".strftime("%d%b%y-%HH%M", $this->date); + + $fname = DOL_DATA_ROOT ."/telephonie/ligne/commande/".$this->datef.".xls"; + + if (strlen(trim($this->fournisseur->email_commande)) == 0) { - return -3; + return -3; } - if (file_exists($fname)) + if (file_exists($fname)) { - return 2; + return 2; } - else + else { - $res = $this->CreateFile($fname); - $res = $res + $this->LogSql(); - $res = $res + $this->MailFile($fname); - - return $res; + $res = $this->CreateFile($fname); + $res = $res + $this->LogSql(); + $res = $res + $this->MailFile($fname); + + return $res; } } - - function Export($linec) + + function Export($dir, $linec) { - $fname = "/tmp/toto.xls"; + //$fname = $dir . "/tmp/toto.xls"; DEBUG DEBUG + $fname = "/tmp/toto.xls"; $workbook = &new writeexcel_workbook($fname);