Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
438d87b3ec
3 changed files with 19 additions and 2 deletions
|
|
@ -9736,6 +9736,19 @@ abstract class CommonObject
|
|||
$this->{$key} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
// Force values to default values when known
|
||||
foreach ($this->fields as $key => $value) {
|
||||
// If fields are already set, do nothing
|
||||
if (array_key_exists($key, $fields)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($value['default'])) {
|
||||
$this->$key = $value['default'];
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2080,8 +2080,12 @@ class ExtraFields
|
|||
|| (is_array($_POST["options_".$key]) && empty($_POST["options_".$key]))) {
|
||||
//print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key];
|
||||
|
||||
// Field is not defined. We mark this as a problem. We may fix it later if there is a default value and $todefaultifmissing is set.
|
||||
// Field is not defined. We mark this as an error. We may fix it later if there is a default value and $todefaultifmissing is set.
|
||||
|
||||
$nofillrequired++;
|
||||
if (!empty($this->attributes[$object->table_element]['langfile'][$key])) {
|
||||
$langs->load($this->attributes[$object->table_element]['langfile'][$key]);
|
||||
}
|
||||
$error_field_required[$key] = $langs->transnoentitiesnoconv($value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3075,7 +3075,7 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
$sql .= " ".price2num($this->localtax2_tx).",";
|
||||
$sql .= " '".$this->db->escape($this->localtax1_type)."',";
|
||||
$sql .= " '".$this->db->escape($this->localtax2_type)."',";
|
||||
$sql .= " ".(!empty($this->subprice) ? price2num($this->subprice, 'MU') : "null").",";
|
||||
$sql .= " ".price2num($this->subprice, 'MU') .",";
|
||||
$sql .= " ".((float) $this->remise_percent).",";
|
||||
$sql .= " ".(isset($this->info_bits) ? ((int) $this->info_bits) : "null").",";
|
||||
$sql .= " ".price2num($this->total_ht, 'MT').",";
|
||||
|
|
|
|||
Loading…
Reference in a new issue