[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10962] Merge 10956:10961 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10962] Merge 10956:10961 from trunk |
Date: |
Mon, 04 Mar 2013 21:59:50 +0000 |
Revision: 10962
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10962
Author: sigurdne
Date: 2013-03-04 21:59:49 +0000 (Mon, 04 Mar 2013)
Log Message:
-----------
Merge 10956:10961 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/property/inc/class.borequest.inc.php
branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
branches/Version-1_0-branch/property/inc/class.soproject.inc.php
branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
branches/Version-1_0-branch/property/inc/hook_config.inc.php
branches/Version-1_0-branch/property/js/yahoo/request.index.js
branches/Version-1_0-branch/property/setup/phpgw_no.lang
branches/Version-1_0-branch/property/setup/setup.inc.php
branches/Version-1_0-branch/property/setup/tables_current.inc.php
branches/Version-1_0-branch/property/setup/tables_update.inc.php
branches/Version-1_0-branch/property/templates/base/request.xsl
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961
Modified: branches/Version-1_0-branch/property/inc/class.borequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.borequest.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -41,7 +41,9 @@
var $sort;
var $order;
var $cat_id;
- public $sum_budget = 0;
+ public $sum_investment = 0;
+ public $sum_operation = 0;
+ public $sum_potential_grants = 0;
public $sum_consume = 0;
public $acl_location = '.project.request';
@@ -479,11 +481,13 @@
'property_cat_id' => $this->property_cat_id,
'building_part' => $this->building_part,
'degree_id' => $this->degree_id,
'attrib_filter' => $attrib_filter, 'condition_survey_id' =>
$this->condition_survey_id));
- $this->total_records = $this->so->total_records;
- $this->sum_budget = $this->so->sum_budget;
- $this->sum_consume =
$this->so->sum_consume;
- $this->uicols = $this->so->uicols;
- $cols_extra =
$this->so->cols_extra;
+ $this->total_records =
$this->so->total_records;
+ $this->sum_investment =
$this->so->sum_investment;
+ $this->sum_operation =
$this->so->sum_operation;
+ $this->sum_potential_grants =
$this->so->sum_potential_grants;
+ $this->sum_consume =
$this->so->sum_consume;
+ $this->uicols =
$this->so->uicols;
+ $cols_extra
= $this->so->cols_extra;
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
Modified:
branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.socondition_survey.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -305,13 +305,21 @@
$cats->supress_info = true;
$categories = $cats->return_sorted_array(0, false, '',
'', '', $globals = true, '', $use_acl = false);
+
/*
+ $import_types = array
+ (
+ 1 => 'Hidden',
+ 2 => 'Normal import',
+ 3 => 'Users/Customers responsibility',
+ );
+*/
+/*
$cats_candidates = array
(
1 => 'Investment',
2 => 'Operation',
3 => 'Combined::Investment/Operation',
- 4 => 'Special'
);
*/
@@ -324,28 +332,29 @@
}
+_debug_array($import_data);die();
foreach ($import_data as $entry)
{
- if( ctype_digit($entry['condition_degree']) &&
$entry['condition_degree'] > 0 && strlen($entry['building_part']) > 2)
+ if( ctype_digit($entry['condition_degree']) &&
$entry['condition_degree'] > 0 && $entry['building_part'] &&
(int)$entry['import_type'] > 0)
{
$request = array();
- if( $entry['percentage_investment'] ==
100)
+ if( $entry['amount_investment'] &&
!$entry['amount_operation'] )
{
if(isset($config->config_data['condition_survey_import_cat'][1]))
{
$request['cat_id'] =
(int)$config->config_data['condition_survey_import_cat'][1];
}
}
- else
if(!$entry['percentage_investment'])
+ if( !$entry['amount_investment'] &&
$entry['amount_operation'] )
{
if(isset($config->config_data['condition_survey_import_cat'][2]))
{
$request['cat_id'] =
(int)$config->config_data['condition_survey_import_cat'][2];
}
}
- else if($entry['percentage_investment']
&& $entry['percentage_investment'] < 100)
+ else
{
if(isset($config->config_data['condition_survey_import_cat'][3]))
{
@@ -361,19 +370,22 @@
$this->_check_building_part($entry['building_part'],$_update_buildingpart);
- $request['condition_survey_id'] =
$survey['id'];
- $request['street_name']
= $location_data['street_name'];
- $request['street_number']
= $location_data['street_number'];
- $request['location']
= $location;
- $request['location_code']
= $survey['location_code'];
- $request['origin_id']
= $GLOBALS['phpgw']->locations->get_id('property', '.project.condition_survey');
- $request['origin_item_id']
= (int)$survey['id'];
- $request['title']
= substr($entry['title'], 0, 255);
- $request['descr']
= $entry['descr'];
- $request['building_part']
= $entry['building_part'];
- $request['coordinator']
= $survey['coordinator_id'];
- $request['status']
= $config->config_data['condition_survey_initial_status'];
- $request['budget']
= $entry['amount'];
+ $request['condition_survey_id']
= $survey['id'];
+ $request['street_name']
= $location_data['street_name'];
+ $request['street_number']
= $location_data['street_number'];
+ $request['location']
= $location;
+ $request['location_code']
= $survey['location_code'];
+ $request['origin_id']
= $GLOBALS['phpgw']->locations->get_id('property',
'.project.condition_survey');
+ $request['origin_item_id']
= (int)$survey['id'];
+ $request['title']
= substr($entry['title'], 0, 255);
+ $request['descr']
= $entry['descr'];
+ $request['building_part']
= $entry['building_part'];
+ $request['coordinator']
= $survey['coordinator_id'];
+ $request['status']
= $config->config_data['condition_survey_initial_status'];
+ $request['amount_investment']
= $entry['amount_investment'];
+ $request['amount_operation']
= $entry['amount_operation'];
+ $request['amount_potential_grants']
= $entry['amount_potential_grants'];
+
$request['planning_value']
= $entry['amount'];
$request['planning_date']
= mktime(13,0,0,7,1, $entry['due_year']?$entry['due_year']:date('Y'));
$request['condition']
= array
@@ -388,16 +400,6 @@
);
$sorequest->add($request,
$values_attribute = array());
- if($entry['amount_extra'] > 0)
- {
-
if(isset($config->config_data['condition_survey_import_cat'][4]))
- {
- $request['cat_id'] =
(int)$config->config_data['condition_survey_import_cat'][4];
- }
- $request['planning_value']
=$entry['amount_extra'];
- $request['budget']
=$entry['amount_extra'];
- $sorequest->add($request,
$values_attribute = array());
- }
}
}
Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -2874,12 +2874,12 @@
$this->db->query("SELECT sum(budget) as budget
FROM fm_project_budget WHERE project_id = {$id} AND year = {$latest_year} AND
active = 1",__LINE__,__FILE__);
$this->db->next_record();
$last_budget = $this->db->f('budget');
-/*
+
if( !abs( $last_budget ) > 0 )
{
throw new
Exception('property_soproject::transfer_budget() - no budget to transfer for
this investment project: ' . $id);
}
-*/
+
//paid last year
$this->db->query("SELECT sum(amount) as paid
FROM fm_project"
. " {$this->join} fm_workorder ON fm_project.id
= fm_workorder.project_id"
@@ -2954,10 +2954,31 @@
switch($type)
{
case 'project':
-
$this->transfer_budget($_id, $new_budget[$_id], $transfer_budget_year);
+ try
+ {
+
$this->transfer_budget($_id, $new_budget[$_id], $transfer_budget_year);
+ }
+ catch(Exception $e)
+ {
+ if ( $e )
+ {
+
phpgwapi_cache::message_set($e->getMessage(), 'error');
+ }
+ }
break;
case 'workorder':
-
$soworkorder->transfer_budget($_id, $new_budget[$_id], $transfer_budget_year);
+ try
+ {
+
$soworkorder->transfer_budget($_id, $new_budget[$_id], $transfer_budget_year);
+ }
+ catch(Exception $e)
+ {
+ if ( $e )
+ {
+
phpgwapi_cache::message_set($e->getMessage(), 'error');
+ }
+ }
+
break;
default:
throw new
Exception('property_soproject::bulk_update_status() - not a valid type');
Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -37,8 +37,9 @@
class property_sorequest extends property_socommon_core
{
- public $sum_budget = 0;
- public $sum_consume = 0;
+ public $sum_investment = 0;
+ public $sum_operation = 0;
+ public $sum_potential_grants = 0;
public $uicols = array();
protected $global_lock = false;
@@ -231,22 +232,26 @@
$sql = "SELECT DISTINCT fm_request.id as
request_id,fm_request_status.descr as status,fm_request.building_part,"
. "
fm_request.start_date,fm_request.closed_date,fm_request.in_progress_date,fm_request.category
as cat_id,"
. " fm_request.delivered_date,fm_request.title as
title,max(fm_request_condition.degree) as condition_degree,"
- . " sum(fm_request_planning.amount) as planned_budget,
fm_request.budget,fm_request.score,min(fm_request_planning.date) as
planned_year"
+ . " sum(fm_request_planning.amount) as planned_budget,
fm_request.amount_investment,"
+ . "
fm_request.amount_operation,fm_request.amount_potential_grants,fm_request.score,min(fm_request_planning.date)
as planned_year"
. " FROM (((( fm_request LEFT JOIN fm_request_status
ON fm_request.status = fm_request_status.id)"
. " LEFT JOIN fm_request_planning ON fm_request.id =
fm_request_planning.request_id)"
. " LEFT JOIN fm_request_consume ON fm_request.id =
fm_request_consume.request_id)"
. " LEFT JOIN fm_request_condition ON fm_request.id =
fm_request_condition.request_id)"
. " {$filtermethod}"
- . " GROUP BY fm_request_status.descr,fm_request.budget,"
+ . " GROUP BY fm_request_status.descr,"
. "
building_part,fm_request.start_date,fm_request.entry_date,fm_request.closed_date,"
- . "
fm_request.in_progress_date,fm_request.delivered_date,title,budget,score,fm_request.id,fm_request_status.descr";
+ . "
fm_request.in_progress_date,fm_request.delivered_date,title,amount_investment,amount_operation,amount_potential_grants,score,fm_request.id,fm_request_status.descr";
- $sql2 = "SELECT count(*) as cnt, sum(budget) as
sum_budget FROM ({$sql}) as t";
+ $sql2 = "SELECT count(*) as cnt, sum(amount_investment)
as sum_investment, sum(amount_operation) as sum_operation,
sum(amount_potential_grants) as sum_potential_grants FROM ({$sql}) as t";
$this->_db->query($sql2,__LINE__,__FILE__);
$this->_db->next_record();
$this->_total_records = $this->_db->f('cnt');
- $this->sum_budget = $this->_db->f('sum_budget');
+ $this->sum_investment =
$this->_db->f('sum_investment');
+ $this->sum_operation =
$this->_db->f('sum_operation');
+ $this->sum_potential_grants =
$this->_db->f('sum_potential_grants');
+
//_debug_array($sql);
/*
@@ -271,16 +276,18 @@
{
$values[] = array
(
- 'id' =>
$this->_db->f('request_id'),
- 'status' =>
$this->_db->f('status',true),
- 'building_part' =>
$this->_db->f('building_part'),
- 'title' =>
$this->_db->f('title',true),
- 'condition_degree' =>
$this->_db->f('condition_degree'),
- 'budget' =>
$this->_db->f('budget'),
- 'planned_budget' =>
$this->_db->f('planned_budget'),
- 'score' =>
$this->_db->f('score'),
- 'planned_year' =>
$this->_db->f('planned_year') ? date('Y', $this->_db->f('planned_year')) : '',
- 'cat_id' =>
$this->_db->f('cat_id'),
+ 'id'
=> $this->_db->f('request_id'),
+ 'status'
=> $this->_db->f('status',true),
+ 'building_part'
=> $this->_db->f('building_part'),
+ 'title'
=> $this->_db->f('title',true),
+ 'condition_degree'
=> $this->_db->f('condition_degree'),
+ 'amount_investment'
=> $this->_db->f('amount_investment'),
+ 'amount_operation'
=> $this->_db->f('amount_operation'),
+ 'amount_potential_grants' =>
$this->_db->f('amount_potential_grants'),
+ 'planned_budget'
=> $this->_db->f('planned_budget'),
+ 'score'
=> $this->_db->f('score'),
+ 'planned_year'
=> $this->_db->f('planned_year') ? date('Y', $this->_db->f('planned_year')) :
'',
+ 'cat_id'
=> $this->_db->f('cat_id'),
);
}
return $values;
@@ -423,13 +430,13 @@
$uicols['sortable'][] = true;
- $cols.= ",$entity_table.budget as budget";
- $cols_return[] = 'budget';
- $cols_group[] = 'budget';
+ $cols.= ",$entity_table.amount_investment as
amount_investment";
+ $cols_return[] =
'amount_investment';
+ $cols_group[] =
'amount_investment';
$uicols['input_type'][] = 'text';
- $uicols['name'][] = 'budget';
- $uicols['descr'][] = lang('cost
estimate');
- $uicols['statustext'][] = lang('total cost
estimate');
+ $uicols['name'][] =
'amount_investment';
+ $uicols['descr'][] =
lang('investment');
+ $uicols['statustext'][] = lang('cost estimate');
$uicols['exchange'][] = '';
$uicols['align'][] = '';
$uicols['datatype'][] = '';
@@ -437,7 +444,33 @@
$uicols['classname'][] = 'rightClasss';
$uicols['sortable'][] = true;
+ $cols.= ",$entity_table.amount_operation as
amount_operation";
+ $cols_return[] =
'amount_operation';
+ $cols_group[] =
'amount_operation';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] =
'amount_operation';
+ $uicols['descr'][] =
lang('operation');
+ $uicols['statustext'][] = lang('cost estimate');
+ $uicols['exchange'][] = '';
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] = 'FormatterRight';
+ $uicols['classname'][] = 'rightClasss';
+ $uicols['sortable'][] = true;
+ $cols.= ",$entity_table.amount_potential_grants as
amount_potential_grants";
+ $cols_return[] =
'amount_potential_grants';
+ $cols_group[] =
'amount_potential_grants';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] =
'amount_potential_grants';
+ $uicols['descr'][] =
lang('potential grants');
+ $uicols['statustext'][] = lang('potential
grants');
+ $uicols['exchange'][] = '';
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] = 'FormatterRight';
+ $uicols['classname'][] = 'rightClasss';
+ $uicols['sortable'][] = true;
// $cols.= ",sum(amount) as consume";
// $cols_return[] = 'consume';
@@ -708,12 +741,14 @@
$this->_db->fetchmode = 'ASSOC';
- $sql2 = "SELECT count(*) as cnt, sum(budget) as
sum_budget FROM ({$sql}) as t";
+ $sql2 = "SELECT count(*) as cnt, sum(amount_investment)
as sum_investment, sum(amount_operation) as sum_operation,
sum(amount_potential_grants) as sum_potential_grants FROM ({$sql}) as t";
$this->_db->query($sql2,__LINE__,__FILE__);
$this->_db->next_record();
$this->_total_records = $this->_db->f('cnt');
- $this->sum_budget = $this->_db->f('sum_budget');
+ $this->sum_investment =
$this->_db->f('sum_investment');
+ $this->sum_operation =
$this->_db->f('sum_operation');
+ $this->sum_potential_grants =
$this->_db->f('sum_potential_grants');
$sql3 = "SELECT sum(fm_request_consume.amount) as
sum_consume FROM {$sql_arr[1]}";
$this->_db->query($sql3,__LINE__,__FILE__);
@@ -789,36 +824,44 @@
$request = array();
if ($this->_db->next_record())
{
+ $amount_investment =
$this->_db->f('amount_investment');
+ $amount_operation =
$this->_db->f('amount_operation');
+ $amount_potential_grants =
$this->_db->f('amount_potential_grants');
+ $budget = $amount_investment +
$amount_operation;
+
$request = array
- (
- 'id'
=> $this->_db->f('id'),
- 'request_id'
=> $this->_db->f('id'), // FIXME
- 'title'
=> $this->_db->f('title', true),
- 'location_code'
=> $this->_db->f('location_code'),
- 'descr'
=> $this->_db->f('descr', true),
- 'status'
=> $this->_db->f('status'),
- 'budget'
=> (int)$this->_db->f('budget'),
- 'tenant_id'
=> $this->_db->f('tenant_id'),
- 'owner'
=> $this->_db->f('owner'),
- 'coordinator'
=> $this->_db->f('coordinator'),
- 'access'
=> $this->_db->f('access'),
- 'start_date'
=> $this->_db->f('start_date'),
- 'end_date'
=> $this->_db->f('end_date'),
- 'cat_id'
=> $this->_db->f('category'),
- 'branch_id'
=> $this->_db->f('branch_id'),
- 'authorities_demands' =>
$this->_db->f('authorities_demands'),
- 'score'
=> $this->_db->f('score'),
- 'p_num'
=> $this->_db->f('p_num'),
- 'p_entity_id'
=> $this->_db->f('p_entity_id'),
- 'p_cat_id'
=> $this->_db->f('p_cat_id'),
- 'contact_phone'
=> $this->_db->f('contact_phone', true),
- 'building_part'
=> $this->_db->f('building_part'),
- 'entry_date'
=> $this->_db->f('entry_date'),
- 'closed_date'
=> $this->_db->f('closed_date'),
- 'in_progress_date'
=> $this->_db->f('in_progress_date'),
- 'delivered_date'
=> $this->_db->f('delivered_date'),
- 'regulations'
=> explode(',', $this->_db->f('regulations'))
- );
+ (
+ 'id'
=> $this->_db->f('id'),
+ 'request_id'
=> $this->_db->f('id'), // FIXME
+ 'title'
=> $this->_db->f('title', true),
+ 'location_code'
=> $this->_db->f('location_code'),
+ 'descr'
=> $this->_db->f('descr', true),
+ 'status'
=> $this->_db->f('status'),
+ 'amount_investment'
=> $amount_investment,
+ 'amount_operation'
=> $amount_operation,
+ 'amount_potential_grants' =>
$amount_potential_grants,
+ 'budget'
=> (int)$budget,
+ 'tenant_id'
=> $this->_db->f('tenant_id'),
+ 'owner'
=> $this->_db->f('owner'),
+ 'coordinator'
=> $this->_db->f('coordinator'),
+ 'access'
=> $this->_db->f('access'),
+ 'start_date'
=> $this->_db->f('start_date'),
+ 'end_date'
=> $this->_db->f('end_date'),
+ 'cat_id'
=> $this->_db->f('category'),
+ 'branch_id'
=> $this->_db->f('branch_id'),
+ 'authorities_demands' =>
$this->_db->f('authorities_demands'),
+ 'score'
=> $this->_db->f('score'),
+ 'p_num'
=> $this->_db->f('p_num'),
+ 'p_entity_id'
=> $this->_db->f('p_entity_id'),
+ 'p_cat_id'
=> $this->_db->f('p_cat_id'),
+ 'contact_phone'
=> $this->_db->f('contact_phone', true),
+ 'building_part'
=> $this->_db->f('building_part'),
+ 'entry_date'
=> $this->_db->f('entry_date'),
+ 'closed_date'
=> $this->_db->f('closed_date'),
+ 'in_progress_date'
=> $this->_db->f('in_progress_date'),
+ 'delivered_date'
=> $this->_db->f('delivered_date'),
+ 'regulations'
=> explode(',', $this->_db->f('regulations'))
+ );
if ( isset($values['attributes']) &&
is_array($values['attributes']) )
{
@@ -929,23 +972,25 @@
$id = $this->next_id();
- $value_set['id']
= $id;
- $value_set['title']
= $this->_db->db_addslashes($request['title']);
- $value_set['owner']
= $this->account;
- $value_set['category'] =
$request['cat_id'];
- $value_set['descr']
= $this->_db->db_addslashes($request['descr']);
-// $value_set['location_code'] =
$request['location_code'];
- $value_set['entry_date'] =
time();
- $value_set['budget'] =
(int)$request['budget'];
- $value_set['status'] =
$request['status'];
- $value_set['branch_id'] =
$request['branch_id'];
- $value_set['coordinator'] =
$request['coordinator'];
- $value_set['authorities_demands'] =
$request['authorities_demands'];
- $value_set['building_part'] =
$request['building_part'];
- $value_set['start_date'] =
$request['start_date'];
- $value_set['end_date'] =
$request['end_date'];
- $value_set['regulations'] =
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : '';
- $value_set['condition_survey_id'] =
$request['condition_survey_id'];
+ $value_set['id']
= $id;
+ $value_set['title']
= $this->_db->db_addslashes($request['title']);
+ $value_set['owner']
= $this->account;
+ $value_set['category']
= $request['cat_id'];
+ $value_set['descr']
= $this->_db->db_addslashes($request['descr']);
+// $value_set['location_code']
= $request['location_code'];
+ $value_set['entry_date']
= time();
+ $value_set['amount_investment'] = (int)
$request['amount_investment'];
+ $value_set['amount_operation'] = (int)
$request['amount_operation'];
+ $value_set['amount_potential_grants'] = (int)
$request['amount_potential_grants'];
+ $value_set['status']
= $request['status'];
+ $value_set['branch_id']
= $request['branch_id'];
+ $value_set['coordinator']
= $request['coordinator'];
+ $value_set['authorities_demands'] =
$request['authorities_demands'];
+ $value_set['building_part']
= $request['building_part'];
+ $value_set['start_date']
= $request['start_date'];
+ $value_set['end_date']
= $request['end_date'];
+ $value_set['regulations']
= $request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' :
'';
+ $value_set['condition_survey_id'] =
$request['condition_survey_id'];
$cols = implode(',', array_keys($value_set));
$values =
$this->_db->validate_insert(array_values($value_set));
@@ -1073,19 +1118,21 @@
$value_set = array
(
- 'title' =>
$this->_db->db_addslashes($request['title']),
- 'status' =>
$request['status'],
- 'category' =>
$request['cat_id'],
- 'start_date' =>
$request['start_date'],
- 'end_date' =>
$request['end_date'],
- 'coordinator' =>
$request['coordinator'],
- 'descr' =>
$this->_db->db_addslashes($request['descr']),
- 'budget' =>
(int)$request['budget'],
- 'location_code' =>
$request['location_code'],
- 'address' =>
$address,
- 'authorities_demands' =>
$request['authorities_demands'],
- 'building_part' =>
$request['building_part'],
- 'regulations' =>
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : ''
+ 'title'
=> $this->_db->db_addslashes($request['title']),
+ 'status'
=> $request['status'],
+ 'category'
=> $request['cat_id'],
+ 'start_date' =>
$request['start_date'],
+ 'end_date'
=> $request['end_date'],
+ 'coordinator' =>
$request['coordinator'],
+ 'descr'
=> $this->_db->db_addslashes($request['descr']),
+ 'amount_investment' =>
(int)$request['amount_investment'],
+ 'amount_operation' =>
(int)$request['amount_operation'],
+ 'amount_potential_grants' =>
(int)$request['amount_potential_grants'],
+ 'location_code' =>
$request['location_code'],
+ 'address'
=> $address,
+ 'authorities_demands' =>
$request['authorities_demands'],
+ 'building_part' =>
$request['building_part'],
+ 'regulations' =>
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : ''
);
while (is_array($request['location']) &&
list($input_name,$value) = each($request['location']))
@@ -1108,13 +1155,15 @@
$this->_db->transaction_begin();
- $this->_db->query("SELECT
budget,status,category,coordinator FROM fm_request where id='"
.$request['id']."'",__LINE__,__FILE__);
+ $this->_db->query("SELECT amount_investment,
amount_operation, amount_potential_grants, status,category,coordinator FROM
fm_request where id='" .$request['id']."'",__LINE__,__FILE__);
$this->_db->next_record();
- $old_budget =
$this->_db->f('budget');
- $old_status = $this->_db->f('status');
- $old_category = $this->_db->f('category');
- $old_coordinator = $this->_db->f('coordinator');
+ $old_investment =
$this->_db->f('amount_investment');
+ $old_operation =
$this->_db->f('amount_operation');
+ $old_potential_grants =
$this->_db->f('amount_potential_grants');
+ $old_status =
$this->_db->f('status');
+ $old_category =
$this->_db->f('category');
+ $old_coordinator =
$this->_db->f('coordinator');
if($old_status != $request['status'])
{
$sql = "SELECT * FROM fm_request_status WHERE
id='{$request['status']}'";
@@ -1227,12 +1276,20 @@
{
$this->historylog->add('C',$request['id'],$request['coordinator'],$old_coordinator);
}
-
- if ($old_budget != $request['budget'])
+/*
+ if ((int)$old_investment !=
(int)$request['amount_investment'])
{
- $this->historylog->add('B',
$request['id'], $request['budget'], $old_budget);
+ $this->historylog->add('B',
$request['id'], $request['amount_investment'], $old_investment);
}
-
+ if ((int)$old_operation !=
(int)$request['amount_operation'])
+ {
+ $this->historylog->add('B',
$request['id'], $request['amount_operation'], $old_operation);
+ }
+ if ((int)$old_potential_grants !=
(int)$request['amount_potential_grants'])
+ {
+ $this->historylog->add('B',
$request['id'], $request['amount_potential_grants'], $old_potential_grants);
+ }
+*/
$receipt['message'][] =
array('msg'=>lang('request %1 has been edited',$request['id']));
}
else
Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -2189,7 +2189,7 @@
$this->db->query("SELECT sum(combined_cost) AS
budget FROM fm_workorder_budget WHERE order_id = {$id} AND year =
{$latest_year}",__LINE__,__FILE__);
$this->db->next_record();
$last_budget = $this->db->f('budget');
- if(!$last_budget)
+ if( !abs( $last_budget ) > 0 )
{
throw new
Exception('property_workorder::transfer_budget() - no budget to transfer for
this investment order: ' . $id);
}
Modified:
branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -396,7 +396,9 @@
array('key' =>
'category','label'=>lang('category'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'condition_degree','label'=>lang('condition
degree'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'score','label'=>lang('score'),'sortable'=>true,'resizeable'=>true),
- array('key' =>
'budget','label'=>lang('budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.portico.FormatterAmount0'),
+ array('key' =>
'amount_investment','label'=>lang('investment'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.portico.FormatterAmount0'),
+ array('key' =>
'amount_operation','label'=>lang('operation'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.portico.FormatterAmount0'),
+ array('key' =>
'amount_potential_grants','label'=>lang('potential
grants'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.portico.FormatterAmount0'),
// array('key' =>
'planned_budget','label'=>lang('planned
budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.portico.FormatterAmount0'),
array('key' =>
'planned_year','label'=>lang('year'),'sortable'=>true,'resizeable'=>true),
array('key' =>
'related','label'=>lang('related'),'sortable'=>false,'resizeable'=>true),
@@ -973,20 +975,20 @@
{
$_options = array
(
- '_skip_import_' =>
'Utelates fra import/implisitt',
- 'import_type' =>
'import type',
- 'building_part' =>
'bygningsdels kode',
- 'descr'
=> 'Tilstandbeskrivelse',
- 'title'
=> 'Tiltak',
- 'hjemmel'
=> 'Hjemmel/ krav',
- 'condition_degree' =>
'Tilstandsgrad',
- 'condition_type' =>
'Konsekvenstype',
- 'consequence' =>
'Konsekvensgrad',
- 'probability' =>
'Sannsynlighet',
- 'due_year'
=> 'År (innen)',
- 'percentage_investment' => 'Andel %
aktivering (U)',
- 'amount'
=> 'Kalkyle netto totalt (VU)',
- 'amount_extra' =>
'Merkostnad ENØK (U)',
+ '_skip_import_'
=> 'Utelates fra import/implisitt',
+ 'import_type'
=> 'import type',
+ 'building_part'
=> 'bygningsdels kode',
+ 'descr'
=> 'Tilstandbeskrivelse',
+ 'title'
=> 'Tiltak',
+ 'hjemmel'
=> 'Hjemmel/ krav',
+ 'condition_degree'
=> 'Tilstandsgrad',
+ 'condition_type'
=> 'Konsekvenstype',
+ 'consequence'
=> 'Konsekvensgrad',
+ 'probability'
=> 'Sannsynlighet',
+ 'due_year'
=> 'År (innen)',
+ 'amount_investment'
=> 'Beløp investering',
+ 'amount_operation'
=> 'Beløp drift',
+ 'amount_potential_grants' =>
'Potensial for offentlig støtte',
);
phpgw::import_class('phpgwapi.sbox');
Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -1958,6 +1958,7 @@
'voucher_out_id' =>
$entry['voucher_out_id'],
'workorder_id' =>
$entry['workorder_id'],
'status'
=> $entry['status'],
+ 'period'
=> $entry['period'],
'invoice_id' =>
$entry['invoice_id'],
'budget_account' =>
$entry['budget_account'],
'dima'
=> $entry['dima'],
@@ -1993,13 +1994,14 @@
$myColumnDefs[2] = array
(
'name' => "2",
- 'values' =>
json_encode(array( array('key' =>
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true),
+ 'values' =>
json_encode(array( array('key' =>
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
array('key' =>
'voucher_id','label'=>lang('bilagsnr'),'sortable'=>false,'resizeable'=>true,'formatter'=>$_formatter_voucher_link),
array('key' => 'voucher_out_id','hidden'=>true),
array('key' =>
'invoice_id','label'=>lang('invoice
number'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'vendor','label'=>lang('vendor'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'amount','label'=>lang('amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
array('key' =>
'approved_amount','label'=>lang('approved
amount'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
+
array('key' =>
'period','label'=>lang('period'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'currency','label'=>lang('currency'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'type','label'=>lang('type'),'sortable'=>false,'resizeable'=>true),
array('key' =>
'budget_responsible','label'=>lang('budget
responsible'),'sortable'=>false,'resizeable'=>true),
Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -883,15 +883,17 @@
//values for Pagination
$json = array
(
- 'recordsReturned' =>
$datatable['pagination']['records_returned'],
- 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
- 'startIndex' =>
$datatable['pagination']['records_start'],
- 'sort' =>
$datatable['sorting']['order'],
- 'dir' =>
$datatable['sorting']['sort'],
- 'currentPage' =>
$datatable['sorting']['currentPage'],
- 'records' =>
array(),
- 'sum_budget' =>
$this->bo->sum_budget,
- 'sum_consume' =>
$this->bo->sum_consume
+ 'recordsReturned' =>
$datatable['pagination']['records_returned'],
+ 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
+ 'startIndex' =>
$datatable['pagination']['records_start'],
+ 'sort'
=> $datatable['sorting']['order'],
+ 'dir'
=> $datatable['sorting']['sort'],
+ 'currentPage' =>
$datatable['sorting']['currentPage'],
+ 'records'
=> array(),
+ 'sum_investment' =>
$this->bo->sum_investment,
+ 'sum_operation' =>
$this->bo->sum_operation,
+ 'sum_potential_grants' =>
$this->bo->sum_potential_grants,
+ 'sum_consume' =>
$this->bo->sum_consume
);
@@ -1183,15 +1185,33 @@
$receipt['error'][]=array('msg'=>lang('Please select a date !'));
}
- if(isset($values['budget']) &&
$values['budget'])
+ if(isset($values['amount_investment']) &&
$values['amount_investment'])
{
- $values['budget'] = str_replace(' ',
'', $values['budget']);
- if( !ctype_digit($values['budget']))
+ $values['amount_investment'] =
str_replace(' ', '', $values['amount_investment']);
+ if(
!ctype_digit($values['amount_investment']))
{
-
$receipt['error'][]=array('msg'=>lang('budget') . ': ' . lang('Please enter an
integer !'));
+
$receipt['error'][]=array('msg'=>lang('investment') . ': ' . lang('Please enter
an integer !'));
$error_id=true;
}
}
+ if(isset($values['amount_operation']) &&
$values['amount_operation'])
+ {
+ $values['amount_operation'] =
str_replace(' ', '', $values['amount_operation']);
+ if(
!ctype_digit($values['amount_operation']))
+ {
+
$receipt['error'][]=array('msg'=>lang('operation') . ': ' . lang('Please enter
an integer !'));
+ $error_id=true;
+ }
+ }
+ if(isset($values['amount_potential_grants']) &&
$values['amount_potential_grants'])
+ {
+ $values['amount_potential_grants'] =
str_replace(' ', '', $values['amount_potential_grants']);
+ if(
!ctype_digit($values['amount_potential_grants']))
+ {
+
$receipt['error'][]=array('msg'=>lang('potential grants') . ': ' . lang('Please
enter an integer !'));
+ $error_id=true;
+ }
+ }
$_condition = array_keys($values['condition']);
$__condition = isset($_condition[0]) &&
$_condition[0] ? $_condition[0] : 0;
@@ -1673,6 +1693,10 @@
'value_diff'
=> number_format($value_diff, 0, ',', ' '),
'value_diff2'
=> number_format($value_diff2, 0, ',', ' '),
+ 'value_amount_potential_grants'
=> number_format($values['amount_potential_grants'], 0, ',', ' '),
+ 'value_amount_investment'
=> number_format($values['amount_investment'], 0, ',', ' '),
+ 'value_amount_operation'
=> number_format($values['amount_operation'], 0, ',', ' '),
+
'location_data2'
=> $location_data,
// 'location_type'
=> 'form2',
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
Modified: branches/Version-1_0-branch/property/inc/hook_config.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/hook_config.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/inc/hook_config.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -350,7 +350,6 @@
1 => 'Investment',
2 => 'Operation',
3 => 'Combined::Investment/Operation',
- 4 => 'Special'
);
$cats = CreateObject('phpgwapi.categories', -1, 'property',
'.project');
Modified: branches/Version-1_0-branch/property/js/yahoo/request.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/request.index.js
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/js/yahoo/request.index.js
2013-03-04 21:59:49 UTC (rev 10962)
@@ -197,13 +197,17 @@
this.addFooterDatatable = function()
{
- tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget,
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
+ tmp_sum_investment =
YAHOO.util.Number.format(values_ds.sum_investment, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
+ tmp_sum_operation =
YAHOO.util.Number.format(values_ds.sum_operation, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
+ tmp_sum_potential_grants =
YAHOO.util.Number.format(values_ds.sum_potential_grants, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
+// tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget,
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
tmp_sum_consume =
YAHOO.util.Number.format(values_ds.sum_consume, {decimalPlaces:0,
decimalSeparator:",", thousandsSeparator:" "});
+
count_empty = 0;
for(i=0;i<myColumnDefs.length;i++)
{
- if (myColumnDefs[i].key == 'budget')
+ if (myColumnDefs[i].key == 'amount_investment')
{
count_empty = i;
break;
@@ -216,7 +220,9 @@
newTR = document.createElement('tr');
td_empty(count_empty);
- td_sum(tmp_sum_budget);
+ td_sum(tmp_sum_investment);
+ td_sum(tmp_sum_operation);
+ td_sum(tmp_sum_potential_grants);
td_sum(tmp_sum_consume);
td_empty(count_empty_end);
//Add to Table
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2013-03-04
19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2013-03-04
21:59:49 UTC (rev 10962)
@@ -1296,6 +1296,7 @@
popup calendar property no Kalender
post property no post
power meter property no Strømmåler
+potential grants property no Potensiell offentlig støtte
precision property no Presisjon
prefix property no prefiks
preview html property no Forhåndsvis som HTML
Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php 2013-03-04
19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php 2013-03-04
21:59:49 UTC (rev 10962)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.665';
+ $setup_info['property']['version'] = '0.9.17.666';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -879,7 +879,9 @@
'tenant_id' => array('type' =>
'int','precision' => '4','nullable' => True),
'contact_phone' => array('type' =>
'varchar','precision' => '20','nullable' => True),
'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True),
- 'budget' => array('type' => 'int','precision'
=> '4','nullable' => True),
+ 'amount_investment' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => True),
+ 'amount_operation' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => True),
+ 'amount_potential_grants' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => True),
'status' => array('type' =>
'varchar','precision' => '10','nullable' => True),
'branch_id' => array('type' =>
'int','precision' => '4','nullable' => True),
'coordinator' => array('type' =>
'int','precision' => '4','nullable' => True),
Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php
2013-03-04 21:59:49 UTC (rev 10962)
@@ -7383,3 +7383,44 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+
+ /**
+ * Update property version from 0.9.17.665 to 0.9.17.666
+ * Add bulk-flag to entities
+ */
+ $test[] = '0.9.17.665';
+ function property_upgrade0_9_17_665()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_request','budget','amount_investment');
+
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_request','amount_investment',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'default' => '0',
+ 'nullable' => true
+ )
+ );
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','amount_operation',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'default' => '0',
+ 'nullable' => true
+ )
+ );
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','amount_potential_grants',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'default' => '0',
+ 'nullable' => true
+ )
+ );
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.666';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
Modified: branches/Version-1_0-branch/property/templates/base/request.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/request.xsl
2013-03-04 19:34:01 UTC (rev 10961)
+++ branches/Version-1_0-branch/property/templates/base/request.xsl
2013-03-04 21:59:49 UTC (rev 10962)
@@ -425,10 +425,38 @@
</xsl:choose>
<dt><label>
+
<xsl:value-of select="php:function('lang', 'investment')"/>
+ </label></dt>
+ <dd>
+ <input
type="text" name="values[amount_investment]" value="{value_amount_investment}">
+
<xsl:attribute name="title"><xsl:value-of
select="lang_budget_statustext"/></xsl:attribute>
+ </input>
+
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+ </dd>
+ <dt><label>
+
<xsl:value-of select="php:function('lang', 'operation')"/>
+ </label></dt>
+ <dd>
+ <input
type="text" name="values[amount_operation]" value="{value_amount_operation}">
+
<xsl:attribute name="title"><xsl:value-of
select="lang_budget_statustext"/></xsl:attribute>
+ </input>
+
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+ </dd>
+ <dt><label>
+
<xsl:value-of select="php:function('lang', 'potential grants')"/>
+ </label></dt>
+ <dd>
+ <input
type="text" name="values[amount_potential_grants]"
value="{value_amount_potential_grants}">
+
<xsl:attribute name="title"><xsl:value-of
select="lang_budget_statustext"/></xsl:attribute>
+ </input>
+
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+ </dd>
+
+ <dt><label>
<xsl:value-of select="php:function('lang', 'total cost estimate')"/>
</label></dt>
<dd>
- <input
type="text" name="values[budget]" value="{value_budget}"><xsl:attribute
name="title"><xsl:value-of
select="lang_budget_statustext"/></xsl:attribute></input><xsl:text> </xsl:text>
[ <xsl:value-of select="currency"/> ]
+
<xsl:value-of select="value_budget"/><xsl:text> </xsl:text> [ <xsl:value-of
select="currency"/> ]
</dd>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10962] Merge 10956:10961 from trunk,
Sigurd Nes <=