mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
phpunit more complete
This commit is contained in:
@@ -4046,9 +4046,10 @@ class Commande extends CommonOrder
|
||||
* Used to build previews or test instances.
|
||||
* id must be 0 if object instance is a specimen.
|
||||
*
|
||||
* @param array<string|mixed> $param Array of options
|
||||
* @return int
|
||||
*/
|
||||
public function initAsSpecimen()
|
||||
public function initAsSpecimen($param = array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -4060,6 +4061,9 @@ class Commande extends CommonOrder
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
if (array_key_exists('tosell', $param)) {
|
||||
$sql .= " AND tosell = ".((int) $param['tosell']);
|
||||
}
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
Reference in New Issue
Block a user