src/Intraface/modules/procurement/ProcurementGateway.php 1 location
|
@@ 172-180 (lines=9) @@
|
| 169 |
|
return $db->numRows(); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
function getMaxNumber() |
| 173 |
|
{ |
| 174 |
|
$db = new DB_sql; |
| 175 |
|
|
| 176 |
|
$db->query("SELECT MAX(number) as max_number FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get("id")); |
| 177 |
|
$db->nextRecord(); |
| 178 |
|
|
| 179 |
|
return $db->f("max_number"); |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
/** |
| 183 |
|
* returns possible status types |
src/Intraface/modules/contact/Contact.php 2 locations
|
@@ 684-692 (lines=9) @@
|
| 681 |
|
* |
| 682 |
|
* @return integer |
| 683 |
|
*/ |
| 684 |
|
public function getMaxNumber() |
| 685 |
|
{ |
| 686 |
|
$db = new DB_Sql(); |
| 687 |
|
$db->query("SELECT number FROM contact WHERE intranet_id = " . $this->kernel->intranet->get("id") . " ORDER BY number DESC"); |
| 688 |
|
if (!$db->nextRecord()) { |
| 689 |
|
return 0; |
| 690 |
|
} |
| 691 |
|
return $db->f("number"); |
| 692 |
|
} |
| 693 |
|
|
| 694 |
|
/** |
| 695 |
|
* Public: Finde data til en liste |
|
@@ 869-877 (lines=9) @@
|
| 866 |
|
* |
| 867 |
|
* @return integer |
| 868 |
|
*/ |
| 869 |
|
function isFilledIn() |
| 870 |
|
{ |
| 871 |
|
$db = new DB_Sql; |
| 872 |
|
$db->query("SELECT count(*) AS antal FROM contact WHERE intranet_id = " . $this->kernel->intranet->get('id')); |
| 873 |
|
if ($db->nextRecord()) { |
| 874 |
|
return $db->f('antal'); |
| 875 |
|
} |
| 876 |
|
return 0; |
| 877 |
|
} |
| 878 |
|
|
| 879 |
|
/** |
| 880 |
|
* Generates a password for the contact |
src/Intraface/modules/product/Product.php 1 location
|
@@ 868-876 (lines=9) @@
|
| 865 |
|
* |
| 866 |
|
* @return integer |
| 867 |
|
*/ |
| 868 |
|
public function isFilledIn() |
| 869 |
|
{ |
| 870 |
|
$db = new DB_Sql; |
| 871 |
|
$db->query("SELECT count(*) AS antal FROM product WHERE intranet_id = " . $this->intranet->getId()); |
| 872 |
|
if ($db->nextRecord()) { |
| 873 |
|
return $db->f('antal'); |
| 874 |
|
} |
| 875 |
|
return 0; |
| 876 |
|
} |
| 877 |
|
|
| 878 |
|
/** |
| 879 |
|
* Checks whether there is any active products. Differs from isFilledIn() by checking for active = 1 |