e-invoice : add communication , bank and buyer reference
This commit is contained in:
parent
244249132f
commit
817dc6f345
5 changed files with 35 additions and 18 deletions
|
|
@ -1286,7 +1286,8 @@ EOF;
|
|||
return $r;
|
||||
}
|
||||
|
||||
/*!\brief the function extra info allows to
|
||||
/*!
|
||||
* \brief the function extra info allows to
|
||||
* - add a attachment
|
||||
* - generate an invoice
|
||||
* - insert extra info
|
||||
|
|
@ -1294,7 +1295,7 @@ EOF;
|
|||
*/
|
||||
|
||||
public function extra_info() {
|
||||
$r = '<div id="facturation_div_id" style="height:185px;height:10rem">';
|
||||
$r = '<div id="facturation_div_id" style="display:flex;height:185px;height:10rem">';
|
||||
// check for upload piece
|
||||
$file = new IFile();
|
||||
$file->table = 0;
|
||||
|
|
@ -1317,8 +1318,8 @@ EOF;
|
|||
}
|
||||
$r.='<br>';
|
||||
$obj = new IText();
|
||||
$r.=_('Numero de bon de commande : ') . $obj->input('bon_comm') . '<br>';
|
||||
$r.=_('Communication ou autre information : ') . $obj->input('other_info') . '<br>';
|
||||
$r.=_('Numero de bon de commande') . $obj->input('bon_comm') . '<br>';
|
||||
$r.=_('Communication') . $obj->input('other_info') . '<br>';
|
||||
$r.='</p>';
|
||||
$r.='</div>';
|
||||
return $r;
|
||||
|
|
|
|||
|
|
@ -1917,16 +1917,14 @@ class Document
|
|||
}
|
||||
/**
|
||||
* @brief transform the current Document to a PDF, returns the full path of the PDF from the TMP folder
|
||||
* if the file IS a pdf , then export it and return the path to the file.
|
||||
*
|
||||
* @todo replace use of unoconv with a PHP lib to convert into PDF
|
||||
* @return string full path to the PDF file
|
||||
*/
|
||||
function transform2pdf()
|
||||
{
|
||||
if (GENERATE_PDF == 'NO' ) {
|
||||
\record_log(__FILE__."D1857 PDF not available");
|
||||
throw new \Exception("Cannot not transform to PDF",5000);
|
||||
}
|
||||
// Extract from public.document
|
||||
// Extract from public.document
|
||||
$dirname=tempnam($_ENV['TMP'],"document");
|
||||
|
||||
if ( $dirname == false ) {
|
||||
|
|
@ -1937,6 +1935,16 @@ class Document
|
|||
if ( mkdir($dirname) == false ) {
|
||||
throw new Exception("D1868.cannot create tmp directory",5000);
|
||||
}
|
||||
if ( $this->d_mimetype == "application/pdf") {
|
||||
$destination_file=$dirname."/".$this->d_filename;
|
||||
$this->export_file($destination_file);
|
||||
return $dirname."/".$destination_file;
|
||||
return;
|
||||
}
|
||||
if (GENERATE_PDF == 'NO' ) {
|
||||
\record_log(__FILE__."D1857 PDF not available");
|
||||
throw new \Exception("Cannot not transform to PDF",5000);
|
||||
}
|
||||
|
||||
$destination_file=$dirname."/".$this->d_filename;
|
||||
$this->export_file($destination_file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue