Fix ODT tags in BOM template
Conflicts: htdocs/core/class/commonobjectline.class.php
This commit is contained in:
parent
f9f902f7f4
commit
6f6d7d7f48
@ -586,6 +586,7 @@ abstract class CommonDocGenerator
|
||||
'line_product_label'=>(empty($line->product_label) ? '' : $line->product_label),
|
||||
'line_product_type'=>(empty($line->product_type) ? '' : $line->product_type),
|
||||
'line_product_barcode'=>(empty($line->product_barcode) ? '' : $line->product_barcode),
|
||||
'line_product_desc'=>(empty($line->product_desc) ? '' : $line->product_desc),
|
||||
|
||||
'line_desc'=>$line->desc,
|
||||
'line_vatrate'=>vatrate($line->tva_tx, true, $line->info_bits),
|
||||
|
||||
@ -89,7 +89,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 0; // Support add of a watermark on drafts
|
||||
|
||||
// Recupere emetteur
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
if (!$this->emetteur->country_code) {
|
||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
|
||||
@ -113,7 +113,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $this->description.".<br>\n";
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">';
|
||||
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$texte .= '<input type="hidden" name="page_y" value="">';
|
||||
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
|
||||
@ -173,6 +173,11 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
}
|
||||
$texte .= '</div>';
|
||||
}
|
||||
// Add input to upload a new template file.
|
||||
$texte .= '<div>'.$langs->trans("UploadNewTemplate").' <input type="file" name="uploadfile">';
|
||||
$texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
|
||||
$texte .= '<input type="submit" class="button small reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';
|
||||
$texte .= '</div>';
|
||||
|
||||
$texte .= '</td>';
|
||||
|
||||
@ -225,6 +230,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$sav_charset_output = $outputlangs->charset_output;
|
||||
$outputlangs->charset_output = 'UTF-8';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->bom->dir_output) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user