[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12107] Property: validate budget account at workorde
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12107] Property: validate budget account at workorder |
Date: |
Wed, 01 Oct 2014 12:36:55 +0000 |
Revision: 12107
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12107
Author: sigurdne
Date: 2014-10-01 12:36:55 +0000 (Wed, 01 Oct 2014)
Log Message:
-----------
Property: validate budget account at workorder
Modified Paths:
--------------
trunk/property/inc/class.bogeneric.inc.php
trunk/property/inc/class.uiworkorder.inc.php
trunk/property/setup/phpgw_no.lang
Modified: trunk/property/inc/class.bogeneric.inc.php
===================================================================
--- trunk/property/inc/class.bogeneric.inc.php 2014-10-01 12:35:49 UTC (rev
12106)
+++ trunk/property/inc/class.bogeneric.inc.php 2014-10-01 12:36:55 UTC (rev
12107)
@@ -176,6 +176,11 @@
public function read_single($data=array())
{
+ if(isset($data['location_info']) &&
$data['location_info']['type'])
+ {
+
$this->get_location_info($data['location_info']['type'],(int)$data['location_info']['type']);
+ unset($data['location_info']);
+ }
$custom_fields = false;
if($GLOBALS['phpgw']->locations->get_attrib_table($this->location_info['acl_app'],
$this->location_info['acl_location']))
{
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2014-10-01 12:35:49 UTC
(rev 12106)
+++ trunk/property/inc/class.uiworkorder.inc.php 2014-10-01 12:36:55 UTC
(rev 12107)
@@ -1088,6 +1088,16 @@
{
$receipt['error'][]=array('msg'=>lang('Please select a budget account !'));
}
+ else
+ {
+ $_b_account =
execMethod('property.bogeneric.read_single', array('id' =>
$values['b_account_id'], 'location_info' => array('type' => 'budget_account')));
+ if(!$_b_account ||
!$_b_account['active'])
+ {
+ $values['b_account_id'] = '';
+ $values['b_account_name'] = '';
+
$receipt['error'][]=array('msg'=>lang('Please select a valid budget account
!'));
+ }
+ }
if(isset($values['budget']) &&
$values['budget'] && !ctype_digit(ltrim($values['budget'],'-')))
{
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2014-10-01 12:35:49 UTC (rev 12106)
+++ trunk/property/setup/phpgw_no.lang 2014-10-01 12:36:55 UTC (rev 12107)
@@ -1280,6 +1280,7 @@
please give som details ! property no Angi detaljer
please select a branch ! property no Velg fag
please select a budget account ! property no Velg en
kostnadsart
+please select a valid budget account ! property no Velg en gyldig
kostnadsart
please select a budget reponsible! property no Velg en anviser
please select a building id ! property no Velg bygnings ID
please select a category ! property no velg kategori
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12107] Property: validate budget account at workorder,
Sigurd Nes <=