mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -130,7 +130,8 @@ if ($action == 'activate_encryptdbpassconf') {
|
||||
header("Location: security.php");
|
||||
exit;
|
||||
} else {
|
||||
setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings');
|
||||
//setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings');
|
||||
setEventMessages($langs->trans('InstrucToClearPass', $langs->transnoentitiesnoconv("DatabasePassword")), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,6 +1040,7 @@ if (empty($reshook)) {
|
||||
$object->note_public = trim(GETPOST('note_public', 'restricthtml'));
|
||||
$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
|
||||
$object->ref_client = GETPOST('ref_client', 'alphanohtml');
|
||||
$object->ref_customer = GETPOST('ref_client', 'alphanohtml');
|
||||
$object->model_pdf = GETPOST('model', 'alphanohtml');
|
||||
$object->fk_project = GETPOST('projectid', 'int');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
||||
@@ -1092,7 +1093,8 @@ if (empty($reshook)) {
|
||||
$object->date_pointoftax = $date_pointoftax;
|
||||
$object->note_public = trim(GETPOST('note_public', 'restricthtml'));
|
||||
$object->note_private = trim(GETPOST('note_private', 'restricthtml'));
|
||||
$object->ref_client = GETPOST('ref_client');
|
||||
$object->ref_client = GETPOST('ref_client', 'alphanohtml');
|
||||
$object->ref_customer = GETPOST('ref_client', 'alphanohtml');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
$object->fk_project = GETPOST('projectid', 'int');
|
||||
$object->cond_reglement_id = 0; // No payment term for a credit note
|
||||
@@ -1662,6 +1664,10 @@ if (empty($reshook)) {
|
||||
|
||||
if ($lines[$i]->subprice < 0 && empty($conf->global->INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN)) {
|
||||
// Negative line, we create a discount line
|
||||
if (empty($desc)) {
|
||||
$desc = $label ? $label : $langs->trans('Discount');
|
||||
}
|
||||
|
||||
$discount = new DiscountAbsolute($db);
|
||||
$discount->fk_soc = $object->socid;
|
||||
$discount->amount_ht = abs($lines[$i]->total_ht);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ abstract class CommonObject
|
||||
* @param int|string $type_contact Type of contact (code or id). Must be id or code found into table llx_c_type_contact. For example: SALESREPFOLL
|
||||
* @param string $source external=Contact extern (llx_socpeople), internal=Contact intern (llx_user)
|
||||
* @param int $notrigger Disable all triggers
|
||||
* @return int <0 if KO, 0 if already added, >0 if OK
|
||||
* @return int <0 if KO, 0 if already added or code not valid, >0 if OK
|
||||
*/
|
||||
public function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0)
|
||||
{
|
||||
@@ -1074,9 +1074,8 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
if ($id_type_contact == 0) {
|
||||
$this->error = 'CODE_NOT_VALID_FOR_THIS_ELEMENT';
|
||||
dol_syslog("CODE_NOT_VALID_FOR_THIS_ELEMENT: Code type of contact '".$type_contact."' does not exists or is not active for element ".$this->element.", we can ignore it");
|
||||
return -3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
$datecreate = dol_now();
|
||||
|
||||
@@ -254,7 +254,7 @@ class DiscountAbsolute
|
||||
|
||||
// Check parameters
|
||||
if (empty($this->description)) {
|
||||
$this->error = 'BadValueForPropertyDescription';
|
||||
$this->error = 'BadValueForPropertyDescriptionOfDiscount';
|
||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2124,6 +2124,7 @@ class ExtraFields
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$visibility_abs = abs($visibility);
|
||||
// not modify if extra field is not in update form (0 : never, 2 or -2 : list only, 5 or - 5 : list and view only)
|
||||
if (empty($visibility_abs) || $visibility_abs == 2 || $visibility_abs == 5) {
|
||||
|
||||
Reference in New Issue
Block a user