From: Edward Date: Tue, 19 Feb 2019 05:51:53 +0000 (+0800) Subject: Fix #5702 - Supplier contact details - extra fields X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=750b54e82dd8dd021d19a8e5a3ea04e788689fd8 Fix #5702 - Supplier contact details - extra fields --- diff --git a/DataObjects/Core_company.php b/DataObjects/Core_company.php index abc15069..cb0af575 100644 --- a/DataObjects/Core_company.php +++ b/DataObjects/Core_company.php @@ -12,7 +12,7 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject public $__table = 'core_company'; // table name public $code; // string(32) not_null public $name; // string(128) - public $remarks; // blob(65535) blob + public $remarks; // blob(65535) blobeforeDeleteb public $owner_id; // int(11) not_null public $address; // blob(65535) blob public $tel; // string(32) @@ -328,7 +328,7 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject $img->onid = $this->id; $img->find(); while ($img->fetch()) { - $img->beforeDelete(); + $img->beforeDelete(array(), $roo); $img->delete(); } return true; diff --git a/DataObjects/I18n.php b/DataObjects/I18n.php index c7ea606b..36614330 100644 --- a/DataObjects/I18n.php +++ b/DataObjects/I18n.php @@ -149,6 +149,29 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject } } + + if(!empty($q['_with_geoip_count'])) { + + $this->selectAdd(" + ( + SELECT + COUNT(geoip_division.id) + FROM + geoip_division + WHERE + geoip_division.country = i18n.lkey + ) AS no_of_division, + ( + SELECT + COUNT(geoip_city.id) + FROM + geoip_city + WHERE + geoip_city.country = i18n.lkey + ) AS no_of_city + "); + + } } function lookupCode($inlang,$ltype,$name)