mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 19:02:35 +01:00
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
@@ -139,7 +139,7 @@ class ExtraFields
|
||||
*
|
||||
* @param string $attrname Code of attribute
|
||||
* @param string $label label of attribute
|
||||
* @param string $type Type of attribute ('boolean','int','varchar','text','html','date','datehour','price','phone','mail','password','url','select','checkbox','separate',...)
|
||||
* @param string $type Type of attribute ('boolean','int','varchar','text','html','date','datetime','price','phone','mail','password','url','select','checkbox','separate',...)
|
||||
* @param int $pos Position of attribute
|
||||
* @param string $size Size/length definition of attribute ('5', '24,8', ...). For float, it contains 2 numeric separated with a comma.
|
||||
* @param string $elementtype Element type. Same value than object->table_element (Example 'member', 'product', 'thirdparty', ...)
|
||||
@@ -207,7 +207,7 @@ class ExtraFields
|
||||
* This is a private method. For public method, use addExtraField.
|
||||
*
|
||||
* @param string $attrname code of attribute
|
||||
* @param int $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datehour','price','phone','mail','password','url','select','checkbox', ...)
|
||||
* @param int $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datetime','price','phone','mail','password','url','select','checkbox', ...)
|
||||
* @param string $length Size/length of attribute ('5', '24,8', ...)
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...)
|
||||
* @param int $unique Is field unique or not
|
||||
@@ -299,7 +299,7 @@ class ExtraFields
|
||||
*
|
||||
* @param string $attrname code of attribute
|
||||
* @param string $label label of attribute
|
||||
* @param int $type Type of attribute ('int', 'varchar', 'text', 'html', 'date', 'datehour', 'float')
|
||||
* @param int $type Type of attribute ('int', 'varchar', 'text', 'html', 'date', 'datetime', 'float')
|
||||
* @param int $pos Position of attribute
|
||||
* @param string $size Size/length of attribute ('5', '24,8', ...)
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
|
||||
@@ -526,7 +526,7 @@ class ExtraFields
|
||||
*
|
||||
* @param string $attrname Name of attribute
|
||||
* @param string $label Label of attribute
|
||||
* @param string $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datehour','price','phone','mail','password','url','select','checkbox', ...)
|
||||
* @param string $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datetime','price','phone','mail','password','url','select','checkbox', ...)
|
||||
* @param int $length Length of attribute
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...)
|
||||
* @param int $unique Is field unique or not
|
||||
|
||||
@@ -81,7 +81,7 @@ function getDolGlobalString($key, $default = '')
|
||||
{
|
||||
global $conf;
|
||||
// return $conf->global->$key ?? $default;
|
||||
return (string) (empty($conf->global->$key) ? $default : $conf->global->$key);
|
||||
return (string) (isset($conf->global->$key) ? $conf->global->$key : $default);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,7 @@ function getDolGlobalInt($key, $default = 0)
|
||||
{
|
||||
global $conf;
|
||||
// return $conf->global->$key ?? $default;
|
||||
return (int) (empty($conf->global->$key) ? $default : $conf->global->$key);
|
||||
return (int) (isset($conf->global->$key) ? $conf->global->$key : $default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -314,6 +314,10 @@ if (empty($reshook)) {
|
||||
if ($pay != "delayed") {
|
||||
$payment->create($user);
|
||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
if ($res < 0) {
|
||||
$error++;
|
||||
dol_htmloutput_errors($langs->trans('ErrorNoPaymentDefined'), $payment->errors, 1);
|
||||
}
|
||||
$remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user