Skip to content

Commit

Permalink
Merge pull request #179 from ATM-Consulting/FIX_exped_doc
Browse files Browse the repository at this point in the history
PULL UP : FIX : DA024733 Can't download sending document
  • Loading branch information
atm-saamiperdrix authored Mar 28, 2024
2 parents 2e09d47 + abef1ce commit 2b055bd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TODO : pour les options commencer à voir si possible de crééer des tab par el

# RELEASE 1.43

- FIX : DA024733 Can't download sending document - 1.43.2 - **28/03/2024**
- FIX : Missing canonical url - 1.43.1 - **12/01/2024**
- FIX : COMPAT V19 - 1.43.0 - **08/12/2023**
- FIX : Handle Captcha inside EACCESS_ROOT_URL domain - 1.42.0 - **06/10/2023**
Expand Down
2 changes: 1 addition & 1 deletion core/modules/modExternalAccess.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db)
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "Ajoute un acces externe pour les clients";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = '1.43.1';
$this->version = '1.43.2';

// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
Expand Down
3 changes: 2 additions & 1 deletion lib/externalaccess.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,8 @@ function load_last_main_doc(&$object) {
$last_main_doc = $conf->propal->multidir_output[$object->entity].'/'.$ref.'/'.$ref.'.pdf';
}
elseif($object->element == 'shipping'){
$last_main_doc = $conf->expedition->multidir_output[$object->entity].'/'.$ref.'/'.$ref.'.pdf';

$last_main_doc = $conf->expedition->multidir_output[$object->entity].'/sending/'.$ref.'/'.$ref.'.pdf';
}
elseif($object->element == 'invoice_supplier'){
$last_main_doc = $conf->supplier_invoice->multidir_output[$object->entity].'/'.$ref.'/'.$ref.'.pdf';
Expand Down
1 change: 0 additions & 1 deletion www/controllers/expeditions.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ public function print_expeditionTable($socId = 0)

load_last_main_doc($object);
$dowloadUrl = $context->getControllerUrl().'script/interface.php?action=downloadExpedition&id='.$object->id;

if(!empty($object->last_main_doc) && is_readable(DOL_DATA_ROOT.'/'.$object->last_main_doc) && is_file ( DOL_DATA_ROOT.'/'.$object->last_main_doc )){
$viewLink = '<a href="'.$dowloadUrl.'" target="_blank" >'.$object->ref.'</a>';
$downloadLink = '<a class="btn btn-xs btn-primary btn-strong" href="'.$dowloadUrl.'&amp;forcedownload=1" target="_blank" ><i class="fa fa-download"></i> '.$langs->trans('Download').'</a>';
Expand Down

0 comments on commit 2b055bd

Please sign in to comment.