Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
812b5f0c17
@ -132,7 +132,7 @@ class Login
|
||||
'code' => 200,
|
||||
'token' => $token,
|
||||
'entity' => $tmpuser->entity,
|
||||
'message' => 'Welcome '.$login.($reset ? ' - Token is new' : ' - This is your token (generated by a previous call). You can use it to make any REST API call, or enter it into the DOLAPIKEY field to use the Dolibarr API explorer.')
|
||||
'message' => 'Welcome '.$login.($reset ? ' - Token is new' : ' - This is your token (recorded for your user). You can use it to make any REST API call, or enter it into the DOLAPIKEY field to use the Dolibarr API explorer.')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -294,12 +294,15 @@ class modStock extends DolibarrModules
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
|
||||
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] = ' FROM ('.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'product_batch as pb)';
|
||||
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product_batch as pb';
|
||||
$this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'product_stock as ps ON ps.rowid = pb.fk_product_stock';
|
||||
$this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = ps.fk_product';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl ON pl.fk_product = p.rowid AND pl.batch = pb.batch';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot_extrafields as extra ON extra.fk_object = pl.rowid,';
|
||||
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'entrepot as e';
|
||||
$this->export_sql_end[$r] .= ' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid AND ps.rowid = pb.fk_product_stock';
|
||||
$this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; }
|
||||
$this->export_sql_end[$r] .= ' WHERE ps.fk_entrepot = e.rowid';
|
||||
$this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')';
|
||||
}
|
||||
|
||||
// Export of stock movements
|
||||
$r++;
|
||||
|
||||
@ -130,7 +130,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
|
||||
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
|
||||
$this->assertEquals($result['curl_error_no'], '');
|
||||
$object=json_decode($result['content'], true);
|
||||
$this->assertNotNull($object, "Parsing of json result must no be null");
|
||||
$this->assertNotNull($object, "Parsing of json result must not be null");
|
||||
$this->assertEquals('200', $object['success']['code']);
|
||||
|
||||
$this->api_key = $object['success']['token'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user