Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
This commit is contained in:
commit
c064540d4b
3 changed files with 9 additions and 5 deletions
|
|
@ -277,9 +277,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
$disposal_type_form = $object->showInputField(null, 'fk_disposal_type', $fk_disposal_type, '', '', '', 0);
|
||||
$object->fields['fk_disposal_type']['visible'] = -2;
|
||||
|
||||
$object->fields['disposal_invoice_id'] = array('type' => 'integer:Facture:compta/facture/class/facture.class.php::entity IN (__SHARED_ENTITIES__)', 'enabled' => '1', 'notnull' => 1, 'visible' => 1, 'index' => 1, 'validate' => '1',);
|
||||
$disposal_invoice_form = $object->showInputField(null, 'disposal_invoice_id', $disposal_invoice_id, '', '', '', 0);
|
||||
unset($object->fields['disposal_invoice_id']);
|
||||
$disposal_invoice_form = $form->selectForForms('Facture:compta/facture/class/facture.class.php::(entity:IN:__SHARED_ENTITIES__)', 'disposal_invoice_id', $disposal_invoice_id);
|
||||
|
||||
// Create an array for form
|
||||
$formquestion = array(
|
||||
|
|
|
|||
|
|
@ -1991,7 +1991,9 @@ if ($action == 'create') {
|
|||
if ($objp->fk_product > 0) {
|
||||
$product = new Product($db);
|
||||
$product->fetch($objp->fk_product);
|
||||
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
|
||||
if (!empty($product->duration_value) && !empty($product->duration_unit)) {
|
||||
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -294,7 +294,11 @@ class CMailFile
|
|||
// Note because media links are public, this should be useless, except avoid blocking images with email browser.
|
||||
// This converts an embed file with src="/viewimage.php?modulepart... into a cid link
|
||||
// TODO Exclude viewimage used for the read tracker ?
|
||||
$findimg = $this->findHtmlImages($dolibarr_main_data_root.'/medias');
|
||||
$dolibarr_main_data_root_images = $dolibarr_main_data_root;
|
||||
if ($conf->entity !== 1) {
|
||||
$dolibarr_main_data_root_images.='/'.$conf->entity.'/';
|
||||
}
|
||||
$findimg = $this->findHtmlImages($dolibarr_main_data_root_images.'/medias');
|
||||
if ($findimg < 0) {
|
||||
dol_syslog("CMailFile::CMailfile: Error on findHtmlImages");
|
||||
$this->error = 'ErrorInAddAttachmentsImageBaseOnMedia';
|
||||
|
|
|
|||
Loading…
Reference in a new issue