Fix file not always defined
This commit is contained in:
parent
0e15aef44f
commit
0feae17ef5
@ -122,6 +122,8 @@ class pdf_paiement
|
||||
|
||||
$month = sprintf("%02d",$month);
|
||||
$year = sprintf("%04d",$year);
|
||||
|
||||
$file = $dir . "/payments-".$year."-".$month.".pdf";
|
||||
switch ($this->doc_type) {
|
||||
case "client":
|
||||
$file = $dir . "/payments-".$year."-".$month.".pdf";
|
||||
@ -251,7 +253,7 @@ class pdf_paiement
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
|
||||
|
||||
$lines[$i][0] = $objp->facnumber;
|
||||
$lines[$i][1] = dol_print_date($this->db->jdate($objp->dp),"day",false,$outputlangs,true);
|
||||
@ -328,9 +330,9 @@ class pdf_paiement
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
||||
$this->result = array('fullpath'=>$file);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user