CVSROOT: /sources/phpgroupware Module name: sms Changes by: Sigurd Nes <sigurdne> 07/09/25 08:17:18
Modified files: bin : config_SD config_VASK receipt_service_agreement.php Log message: update CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/sms/bin/config_SD?cvsroot=phpgroupware&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/sms/bin/config_VASK?cvsroot=phpgroupware&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/sms/bin/receipt_service_agreement.php?cvsroot=phpgroupware&r1=1.2&r2=1.3 Patches: Index: config_SD =================================================================== RCS file: /sources/phpgroupware/sms/bin/config_SD,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- config_SD 13 Aug 2007 18:41:15 -0000 1.2 +++ config_SD 25 Sep 2007 08:17:17 -0000 1.3 @@ -8,7 +8,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package sms * @subpackage sms - * @version $Id: config_SD,v 1.2 2007/08/13 18:41:15 sigurdne Exp $ + * @version $Id: config_SD,v 1.3 2007/09/25 08:17:17 sigurdne Exp $ */ /** @@ -21,5 +21,13 @@ $id_field = 'location_code'; $target_field = 'kvittering'; + if($agreement_id && isset($param[0]) && $param[0]) + { $filter = "WHERE agreement_id = $agreement_id AND location_code ilike '" . $param[0] . "%'"; + } + + $this->db->query("SELECT id FROM fm_s_agreement_attribute WHERE column_name = '$target_field' AND attrib_detail=2",__LINE__,__FILE__); + $this->db->next_record(); + $attrib_id = $this->db->f('id'); + ?> Index: config_VASK =================================================================== RCS file: /sources/phpgroupware/sms/bin/config_VASK,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- config_VASK 13 Aug 2007 18:41:15 -0000 1.2 +++ config_VASK 25 Sep 2007 08:17:17 -0000 1.3 @@ -8,7 +8,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package sms * @subpackage sms - * @version $Id: config_VASK,v 1.2 2007/08/13 18:41:15 sigurdne Exp $ + * @version $Id: config_VASK,v 1.3 2007/09/25 08:17:17 sigurdne Exp $ */ /** @@ -17,9 +17,17 @@ * Config values for SMS-command "VASK" - cleaning in Norwegian - as example - as it is configured at BBB */ - $agreement_id = ''; + $agreement_id = '22331'; $id_field = 'location_code'; $target_field = 'kvittering'; + if($agreement_id && isset($param[0]) && $param[0]) + { $filter = "WHERE agreement_id = $agreement_id AND location_code ilike '" . $param[0] . "%'"; + } + + $this->db->query("SELECT id FROM fm_s_agreement_attribute WHERE column_name = '$target_field' AND attrib_detail=2",__LINE__,__FILE__); + $this->db->next_record(); + $attrib_id = $this->db->f('id'); + ?> Index: receipt_service_agreement.php =================================================================== RCS file: /sources/phpgroupware/sms/bin/receipt_service_agreement.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- receipt_service_agreement.php 13 Aug 2007 18:41:15 -0000 1.2 +++ receipt_service_agreement.php 25 Sep 2007 08:17:17 -0000 1.3 @@ -8,7 +8,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package sms * @subpackage sms - * @version $Id: receipt_service_agreement.php,v 1.2 2007/08/13 18:41:15 sigurdne Exp $ + * @version $Id: receipt_service_agreement.php,v 1.3 2007/09/25 08:17:17 sigurdne Exp $ */ /** @@ -19,14 +19,11 @@ $param = explode(' ' , $command_param); include(PHPGW_SERVER_ROOT . SEP . 'sms' . SEP . 'bin' . SEP . 'config_' . strtoupper(basename($command_code))); - - $this->db->query("SELECT id FROM fm_s_agreement_attribute WHERE column_name = '$target_field' AND attrib_detail=2",__LINE__,__FILE__); - $this->db->next_record(); - $attrib_id = $this->db->f('id'); - + if(isset($filter) && $filter) + { $sql = "SELECT id from fm_s_agreement_detail $filter"; - $this->db->query($sql,__LINE__,__FILE__); + if($this->db->next_record() && $agreement_id && $attrib_id) { $id = $this->db->f('id'); @@ -40,4 +37,6 @@ $this->account = 6; $this->websend2pv('Admin',$sms_sender,'Takk for det! - Melding er mottatt','text','0'); } + } + _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs