Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
This commit is contained in:
commit
bada3afebb
@ -68,7 +68,7 @@ $nowarray = dol_getdate($now);
|
||||
|
||||
if (!GETPOSTISSET("date_startmonth")) {
|
||||
$date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
|
||||
} else if (GETPOST("date_startmonth") > 0) {
|
||||
} elseif (GETPOST("date_startmonth") > 0) {
|
||||
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel');
|
||||
} else {
|
||||
$date_start = -1;
|
||||
|
||||
@ -798,6 +798,15 @@ abstract class CommonDocGenerator
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
|
||||
|
||||
// Load product data optional fields to the line -> enables to use "line_product_options_{extrafield}"
|
||||
if (isset($line->fk_product) && $line->fk_product > 0)
|
||||
{
|
||||
$tmpproduct = new Product($this->db);
|
||||
$result = $tmpproduct->fetch($line->fk_product);
|
||||
foreach ($tmpproduct->array_options as $key=>$label)
|
||||
$resarray["line_product_".$key] = $label;
|
||||
}
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
|
||||
@ -1793,7 +1793,7 @@ class Thirdparties extends DolibarrApi
|
||||
*
|
||||
* Return an array with thirdparty informations
|
||||
*
|
||||
* @param int $rowid Id of third party to load
|
||||
* @param int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criterias)
|
||||
* @param string $ref Reference of third party, name (Warning, this can return several records)
|
||||
* @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr)
|
||||
* @param string $barcode Barcode of third party to load
|
||||
@ -1815,7 +1815,7 @@ class Thirdparties extends DolibarrApi
|
||||
if (!DolibarrApiAccess::$user->rights->societe->lire) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
if ($rowid == 0) {
|
||||
if ($rowid === 0) {
|
||||
$result = $this->company->initAsSpecimen();
|
||||
} else {
|
||||
$result = $this->company->fetch($rowid, $ref, $ref_ext, $barcode, $idprof1, $idprof2, $idprof3, $idprof4, $idprof5, $idprof6, $email, $ref_alias);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user