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