[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9254] Merge 9220:9253 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9254] Merge 9220:9253 from trunk |
Date: |
Wed, 02 May 2012 08:17:55 +0000 |
Revision: 9254
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9254
Author: sigurdne
Date: 2012-05-02 08:17:55 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Merge 9220:9253 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.menu.inc.php
branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
branches/Version-1_0-branch/controller/js/controller/ajax.js
branches/Version-1_0-branch/controller/setup/setup.inc.php
branches/Version-1_0-branch/controller/setup/tables_current.inc.php
branches/Version-1_0-branch/controller/setup/tables_update.inc.php
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/cases_tab_menu.xsl
branches/Version-1_0-branch/controller/templates/base/css/base.css
branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
branches/Version-1_0-branch/phpgwapi/templates/portico/head.tpl
branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.bolookup.inc.php
branches/Version-1_0-branch/property/inc/class.menu.inc.php
branches/Version-1_0-branch/property/inc/class.soXport.inc.php
branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
branches/Version-1_0-branch/property/inc/export/default/Basware_X114
branches/Version-1_0-branch/property/js/portico/ajax_invoice.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/config.tpl
branches/Version-1_0-branch/property/templates/base/css/base.css
branches/Version-1_0-branch/property/templates/base/invoice2.xsl
branches/Version-1_0-branch/property/templates/base/workorder.xsl
Added Paths:
-----------
branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js
branches/Version-1_0-branch/property/js/tinybox2/
Removed Paths:
-------------
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/view_measurements.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
+
/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
Modified: branches/Version-1_0-branch/controller/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.menu.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.menu.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -41,7 +41,7 @@
'controller' => array
(
'text' => lang('Controller'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=>
'controller.uicontrol.view_control_details') ),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=>
'controller.uicontrol.control_list') ),
'image' => array('property',
'location'),
'order' => 10,
'group' => 'office'
Modified: branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -58,18 +58,12 @@
{
$cols = array(
'control_item_id',
- 'status',
- 'comment',
- 'check_list_id',
- 'measurement'
+ 'check_list_id'
);
$values = array(
$this->marshal($check_item->get_control_item_id(), 'int'),
- $check_item->get_status(),
- $this->marshal($check_item->get_comment(),
'string'),
-
$this->marshal($check_item->get_check_list_id(), 'int'),
- $this->marshal($check_item->get_measurement(),
'int')
+
$this->marshal($check_item->get_check_list_id(), 'int')
);
$result = $this->db->query('INSERT INTO
controller_check_item (' . join(',', $cols) . ') VALUES (' . join(',', $values)
. ')', __LINE__,__FILE__);
@@ -83,10 +77,7 @@
$values = array(
'control_item_id = ' .
$this->marshal($check_item->get_control_item_id(), 'int'),
- 'status = ' . $check_item->get_status(),
- 'comment = ' .
$this->marshal($check_item->get_comment(), 'string'),
- 'check_list_id = ' .
$this->marshal($check_item->get_check_list_id(), 'int'),
- 'measurement = ' .
$this->marshal($check_item->get_measurement(), 'string')
+ 'check_list_id = ' .
$this->marshal($check_item->get_check_list_id(), 'int')
);
$result = $this->db->query('UPDATE
controller_check_item SET ' . join(',', $values) . " WHERE id=$id",
__LINE__,__FILE__);
@@ -112,8 +103,6 @@
if($this->db->next_record()) {
$check_item = new
controller_check_item($this->unmarshal($this->db->f('c_id', true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
@@ -135,7 +124,7 @@
}
public function get_single_with_cases($check_item_id,
$return_type = "return_object"){
- $sql = "SELECT ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment, ci.measurement, check_list_id, ";
+ $sql = "SELECT ci.id as ci_id, control_item_id,
check_list_id, ";
$sql .= "cic.id as cic_id, cic.status as cic_status,
cic.*, ";
$sql .= "coi.id as coi_id, coi.* ";
$sql .= "FROM controller_check_item ci ";
@@ -153,10 +142,7 @@
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
$control_item->set_title($this->db->f('title', true), 'string');
@@ -221,8 +207,6 @@
if($this->db->next_record()) {
$check_item = new
controller_check_item($this->unmarshal($this->db->f('c_id', true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
@@ -244,7 +228,7 @@
}
public function get_check_items($check_list_id, $status, $type,
$return_type = "return_object"){
- $sql = "SELECT ci.id as ci_id, ci.status,
control_item_id, ci.comment, ci.measurement, check_list_id, ";
+ $sql = "SELECT ci.id as ci_id, control_item_id,
check_list_id, ";
$sql .= "coi.id as coi_id, coi.title, coi.required,
coi.what_to_do, coi.how_to_do, coi.control_group_id, coi.type ";
$sql .= "FROM controller_check_item ci ";
$sql .= "LEFT JOIN controller_control_item as coi ON
ci.control_item_id = coi.id ";
@@ -263,10 +247,7 @@
while ($this->db->next_record()) {
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
$control_item->set_title($this->db->f('title',
true), 'string');
@@ -290,7 +271,7 @@
}
public function get_check_items_with_cases($check_list_id,
$type = "control_item_type_1", $status = "open", $messageStatus = null,
$return_type = "return_object"){
- $sql = "SELECT ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment, check_list_id, ";
+ $sql = "SELECT ci.id as ci_id, control_item_id,
check_list_id, ";
$sql .= "cic.id as cic_id, cic.status as cic_status,
cic.*, ";
$sql .= "coi.id as coi_id, coi.* ";
$sql .= "FROM controller_check_item ci ";
@@ -338,10 +319,7 @@
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->db->f('ci_status', true), 'int');
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
$control_item->set_title($this->db->f('title', true), 'string');
@@ -396,7 +374,7 @@
}
public function
get_check_items_with_cases_by_message($message_ticket_id, $return_type =
"return_object"){
- $sql = "SELECT ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment, ci.measurement, ";
+ $sql = "SELECT ci.id as ci_id, control_item_id, ";
$sql .= "check_list_id, cic.id as cic_id, cic.status as
cic_status, cic.*, ";
$sql .= "coi.id as coi_id, coi.* ";
$sql .= "FROM controller_check_item ci ";
@@ -423,10 +401,7 @@
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
$control_item->set_title($this->db->f('title', true), 'string');
@@ -494,10 +469,7 @@
while ($this->db->next_record()) {
$check_item = new
controller_check_item($this->unmarshal($this->db->f('id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
if($return_type == "return_array")
$check_items_array[] =
$check_item->toArray();
Modified: branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -53,8 +53,8 @@
public function get_single($check_list_id){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.control_id, cl.comment as cl_comment, deadline, planned_date, ";
- $sql .= "completed_date, location_code, component_id,
num_open_cases, num_pending_cases, ci.id as ci_id, ci.status as ci_status,
control_item_id, ";
- $sql .= "ci.comment as ci_comment, check_list_id ";
+ $sql .= "completed_date, location_code, component_id,
num_open_cases, num_pending_cases, ci.id as ci_id, control_item_id, ";
+ $sql .= "check_list_id ";
$sql .= "FROM controller_check_list cl ";
$sql .= "LEFT JOIN controller_check_item as ci ON cl.id =
ci.check_list_id ";
$sql .= "WHERE cl.id = $check_list_id";
@@ -81,8 +81,6 @@
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'int'));
-
$check_item->set_comment($this->unmarshal($this->db->f('ci_comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
$check_items_array[] = $check_item;
@@ -100,7 +98,7 @@
public function get_single_with_check_items($check_list_id, $status,
$type){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.control_id, cl.comment as cl_comment, deadline, planned_date,
completed_date, num_open_cases, location_code, num_pending_cases, ";
- $sql .= "ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment as ci_comment, check_list_id, ";
+ $sql .= "ci.id as ci_id, control_item_id, check_list_id, ";
$sql .= "coi.title as coi_title, coi.required as coi_required,
";
$sql .= "coi.what_to_do as coi_what_to_do, coi.how_to_do as
coi_how_to_do, coi.control_group_id as coi_control_group_id, coi.type ";
$sql .= "FROM controller_check_list cl ";
@@ -139,10 +137,7 @@
if($this->db->f('ci_id', true) != ''){
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'bool'));
-
$check_item->set_comment($this->unmarshal($this->db->f('ci_comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
$control_item->set_title($this->db->f('coi_title', true), 'string');
@@ -167,7 +162,7 @@
return null;
}
}
-
+ /*
public function get_check_list(){
$current_time = time();
@@ -208,11 +203,11 @@
return $results;
}
-
+ */
function get_check_lists_for_control($control_id){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.comment as cl_comment, deadline, planned_date, ";
$sql .= "completed_date, component_id, location_code,
num_open_cases, num_pending_cases ";
- $sql .= "ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment as ci_comment, check_list_id ";
+ $sql .= "ci.id as ci_id, control_item_id, check_list_id ";
$sql .= "FROM controller_check_list cl, controller_check_item
ci ";
$sql .= "WHERE cl.control_id = $control_id ";
$sql .= "AND cl.id = ci.check_list_id ";
@@ -247,8 +242,6 @@
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
-
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'int'));
-
$check_item->set_comment($this->unmarshal($this->db->f('ci_comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
$check_items_array[] = $check_item->toArray();
@@ -311,17 +304,17 @@
function get_agg_check_lists_for_location( $location_code,
$from_date_ts, $to_date_ts, $control_id = 0 ){
- $sql = "SELECT c.id as c_id, title, start_date, end_date,
cl.id as cl_id, c.repeat_type, c.repeat_interval, cl.deadline, count(ci.id) ";
+ $sql = "SELECT c.id as c_id, title, start_date, end_date,
cl.id as cl_id, c.repeat_type, c.repeat_interval, cl.deadline,
count(cl.num_open_cases) ";
$sql .= "FROM controller_check_list cl, controller_control c,
controller_check_item ci ";
$sql .= "WHERE cl.location_code = '{$location_code}' ";
+
if($control_id > 0)
{
$sql .= "AND c.id = {$control_id} ";
}
+
$sql .= "AND c.repeat_type < 2 ";
$sql .= "AND cl.control_id = c.id ";
- $sql .= "AND cl.id = ci.check_list_id ";
- $sql .= "AND ci.status = 0 ";
$sql .= "AND deadline BETWEEN $from_date_ts AND $to_date_ts ";
$sql .= "GROUP BY c.id, title, start_date, end_date, cl.id,
cl.deadline, c.repeat_type, c.repeat_interval ";
$sql .= "ORDER BY c.id";
Modified: branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -99,13 +99,7 @@
$new_check_item = new controller_check_item();
$new_check_item->set_check_list_id(
$check_list_id );
$new_check_item->set_control_item_id(
$control_item_id );
- if($status == 0)
- $new_check_item->set_status(
controller_check_item_case::STATUS_OPEN );
- else
- $new_check_item->set_status(
controller_check_item_case::STATUS_CLOSED );
-
- $new_check_item->set_comment( null );
-
+
$saved_check_item_id =
$this->so_check_item->store( $new_check_item );
$check_item =
$this->so_check_item->get_single($saved_check_item_id);
}
Modified: branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -64,13 +64,9 @@
'register_case' => true,
'view_open_cases' => true,
'view_closed_cases' => true,
-
'view_measurements' => true,
'view_control_details' => true,
'view_control_items' => true,
-
'add_check_item_to_list' => true,
-
'save_check_items' => true,
-
'save_check_item' => true,
-
'get_check_list_info' => true,
+
'get_check_list_info' => true,
'get_cases_for_check_list' => true
);
@@ -694,83 +690,7 @@
self::render_template_xsl('check_list/view_control_items', $data);
}
-
- function add_check_item_to_list(){
- $control_item_id = phpgw::get_var('control_item_id');
- $check_list_id = phpgw::get_var('check_list_id');
- $comment = phpgw::get_var('comment');
- $status = (int)phpgw::get_var('status');
- $type = phpgw::get_var('type');
-
- $check_item_obj = new controller_check_item();
- $check_item_obj->set_status($status);
- $check_item_obj->set_comment($comment);
- $check_item_obj->set_check_list_id($check_list_id);
- $check_item_obj->set_control_item_id($control_item_id);
-
- if($type == 'control_item_type_2'){
- $measurement = phpgw::get_var('measurement');
- $check_item_obj->set_measurement($measurement);
- }
-
- $check_item_id = $this->so_check_item->store(
$check_item_obj );
-
- if($check_item_id > 0)
- return json_encode( array( "status" => "saved"
) );
- else
- return json_encode( array( "status" =>
"not_saved" ) );
- }
-
- public function save_check_items(){
- $check_item_ids = phpgw::get_var('check_item_ids');
- $check_list_id = phpgw::get_var('check_list_id');
-
- foreach($check_item_ids as $check_item_id){
- $status = phpgw::get_var('status_' .
$check_item_id);
- $comment = phpgw::get_var('comment_' .
$check_item_id);
-
- $check_item =
$this->so_check_item->get_single($check_item_id);
-
- $check_item->set_status( $status );
- $check_item->set_comment( $comment );
-
- $this->so_check_item->store( $check_item );
- }
-
- $this->redirect(array('menuaction' =>
'controller.uicheck_list_for_location.view_check_list',
'check_list_id'=>$check_list_id));
- }
-
- public function save_check_item(){
- $check_item_id = phpgw::get_var('check_item_id');
- $comment = phpgw::get_var('comment');
- $status = (int)phpgw::get_var('status');
-
- $check_item =
$this->so_check_item->get_single($check_item_id);
- $control_item_id = $check_item->get_control_item_id();
-
- $control_item =
$this->so_control_item->get_single($check_item->get_control_item_id());
-
- if($control_item->get_type() == 'control_item_type_2')
- {
- $measurement = phpgw::get_var('measurement');
- $check_item->set_measurement( $measurement );
- }
-
- $check_item->set_status( $status );
- $check_item->set_comment( $comment );
-
- $check_item_id = $this->so_check_item->store(
$check_item );
-
- if($check_item_id > 0){
- $status_checker = new status_checker();
- $status_checker->update_check_list_status(
$check_item->get_check_list_id() );
-
- return json_encode( array( "status" => "saved"
) );
- }
- else
- return json_encode( array( "status" =>
"not_saved" ) );
- }
-
+
// Returns check list info as JSON
public function get_check_list_info()
{
Modified: branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -37,6 +37,8 @@
phpgw::import_class('controller.socontrol_item_list');
phpgw::import_class('controller.soprocedure');
+ phpgw::import_class('phpgwapi.yui');
+
include_class('controller', 'control', 'inc/model/');
include_class('controller', 'control_area', 'inc/model/');
include_class('controller', 'control_item_list', 'inc/model/');
@@ -345,6 +347,8 @@
self::add_javascript('controller', 'controller',
'jquery.js');
self::add_javascript('controller', 'controller',
'ajax.js');
self::add_javascript('controller', 'controller',
'jquery-ui.custom.min.js');
+ //$GLOBALS['phpgw']->jqcal->add_listener('start_date');
+ //$GLOBALS['phpgw']->jqcal->add_listener('end_date');
$GLOBALS['phpgw']->css->add_external_file('controller/templates/base/css/jquery-ui.custom.css');
Modified:
branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -36,10 +36,7 @@
protected $id;
protected $control_item_id;
- protected $status;
- protected $comment;
protected $check_list_id;
- protected $measurement;
// Objects
protected $control_item;
@@ -70,20 +67,6 @@
public function get_control_item_id() { return
$this->control_item_id; }
- public function set_status($status)
- {
- $this->status = (int)$status;
- }
-
- public function get_status() { return (int)$this->status; }
-
- public function set_comment($comment)
- {
- $this->comment = $comment;
- }
-
- public function get_comment() { return $this->comment; }
-
public function set_check_list_id($check_list_id)
{
$this->check_list_id = $check_list_id;
@@ -91,14 +74,7 @@
public function get_check_list_id() { return
$this->check_list_id; }
- public function set_measurement($measurement)
- {
- $this->measurement = $measurement;
- }
- public function get_measurement() { return $this->measurement; }
-
-
// ================= Getters and setters for objects
=================
public function set_control_item($control_item)
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-05-02 08:17:55 UTC (rev 9254)
@@ -430,7 +430,7 @@
});
// Fetches info about a check list on hover status image icon
- $('a.view_check_list').bind('contextmenu', function(){
+ $('a.view_info_box').bind('contextmenu', function(){
var thisA = $(this);
var divWrp = $(this).parent();
@@ -454,19 +454,17 @@
var infoBox = $(divWrp).find("#info_box");
$(infoBox).show();
- var htmlStr = "<h5>Åpne saker</h5><ul>";
+ var htmlStr = "<h3>Åpne saker</h3>";
$.each(obj, function(i) {
- htmlStr += "<li><label>" +
(parseInt(i) + 1) + ": Tittel</label><span>" + obj[i].control_item.title +
"</span>";
- htmlStr += "<ul>";
-
+ htmlStr += "<div
class='check_item'><h5>" + (parseInt(i) + 1) + ". " + obj[i].control_item.title
+ "</h5>";
+
$(obj[i].cases_array).each(function(j) {
- htmlStr += "<li>" + "Sak " +
(parseInt(j) + 1) + ": " + obj[i].cases_array[j].descr + "</li>";
+ htmlStr += "<p class='case'>"
+ "<label>Sak " + (parseInt(j) + 1) + ": </label>" +
obj[i].cases_array[j].descr + "</p>";
});
- htmlStr += "</ul></li>";
});
- htmlStr += "</ul>";
+ htmlStr += "</div>";
$(infoBox).html( htmlStr );
}
@@ -476,40 +474,12 @@
return false;
});
- $("a.view_check_list").mouseout(function(){
+ $("a.view_info_box").mouseout(function(){
var infoBox = $(this).parent().find("#info_box");
$(infoBox).hide();
});
- $(".frm_save_check_item").live("submit", function(e){
- e.preventDefault();
- var thisForm = $(this);
- var submitBnt = $(thisForm).find("input[type='submit']");
- var requestUrl = $(thisForm).attr("action");
-
- $.ajax({
- type: 'POST',
- url: requestUrl + "&phpgw_return_as=json&" +
$(thisForm).serialize(),
- success: function(data) {
- if(data){
- var obj = jQuery.parseJSON(data);
-
- if(obj.status == "saved"){
- var submitBnt =
$(thisForm).find("input[type='submit']");
- $(submitBnt).val("Lagret");
-
- // Changes text on save button
back to original
- window.setTimeout(function() {
- $(submitBnt).val('Oppdater
måling');
-
$(submitBnt).addClass("not_active");
- }, 1000);
- }
- }
- }
- });
- });
-
$(".frm_save_control_item").live("click", function(e){
e.preventDefault();
var thisForm = $(this);
@@ -893,13 +863,13 @@
return false;
});
-
+ /*
$(".frm_save_check_item").live("click", function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
$(submitBnt).removeClass("not_active");
});
-
+ */
$(".frm_register_case").live("click", function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
@@ -925,14 +895,14 @@
var wrpElem = $(this).parents("dd");
$(wrpElem).find(".help_text").fadeOut(300);
});
-
+ /*
$(".frm_save_check_item").click(function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
$(submitBnt).removeClass("not_active");
});
-
+ */
$(".frm_save_control_item").click(function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
Modified: branches/Version-1_0-branch/controller/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-05-02
06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-05-02
08:17:55 UTC (rev 9254)
@@ -1,6 +1,6 @@
<?php
$setup_info['controller']['name'] = 'controller';
- $setup_info['controller']['version'] = '0.1.31';
+ $setup_info['controller']['version'] = '0.1.33';
$setup_info['controller']['app_order'] = 100;
$setup_info['controller']['enable'] = 1;
$setup_info['controller']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/controller/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -56,9 +56,6 @@
'fd' => array(
'id' => array('type' => 'auto','precision' =>
4,'nullable' => False),
'control_item_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
- 'status' => array('type' => 'int', 'precision'
=> 2, 'nullable' => true),
- 'comment' => array('type' =>
'varchar','precision' => '255','nullable' => False),
- 'measurement' => array('type' =>
'varchar', 'precision' => '50', 'nullable' => True),
'check_list_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True)
),
'pk' => array('id'),
@@ -71,7 +68,7 @@
'id' => array('type' => 'auto','precision' =>
4,'nullable' => False),
'control_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'status' => array('type' =>
'varchar','precision' => '255','nullable' => false),
- 'comment' => array('type' =>
'varchar','precision' => '255','nullable' => false),
+ 'comment' => array('type' => 'text', 'nullable'
=> True),
'deadline' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'planned_date' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'completed_date' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
Modified: branches/Version-1_0-branch/controller/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -633,4 +633,27 @@
$GLOBALS['setup_info']['controller']['currentver'] = '0.1.31';
return $GLOBALS['setup_info']['controller']['currentver'];
- }
\ No newline at end of file
+ }
+
+ $test[] = '0.1.31';
+ function controller_upgrade0_1_31()
+ {
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_check_item', array(),
'status');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_check_item', array(),
'comment');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_check_item', array(),
'measurement');
+
+ $GLOBALS['setup_info']['controller']['currentver'] = '0.1.32';
+ return $GLOBALS['setup_info']['controller']['currentver'];
+ }
+
+ $test[] = '0.1.32';
+ function controller_upgrade0_1_32()
+ {
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('controller_check_list','comment',array(
+ 'type' => 'text',
+ 'nullable' => true
+ ));
+
+ $GLOBALS['setup_info']['controller']['currentver'] = '0.1.33';
+ return $GLOBALS['setup_info']['controller']['currentver'];
+ }
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -75,7 +75,7 @@
<xsl:when test="status =
'control_accomplished_with_errors'">
<div style="position:relative;background:
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
<div id="info_box"></div>
- <a class="view_check_list">
+ <a class="view_info_box">
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -39,8 +39,6 @@
</div>
<div class="middle">
-
-
<ul id="icon_color_map">
<li><img height="15"
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt
opp</span></li>
<li><img height="15"
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt
dato</span></li>
@@ -60,7 +58,7 @@
</xsl:attribute>
Årsoversikt
</a>
-
+ <!--
<select id="loc_1" class="choose_loc">
<xsl:for-each select="property_array">
<xsl:variable
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
@@ -78,7 +76,7 @@
</xsl:choose>
</xsl:for-each>
</select>
-
+ -->
</div>
Deleted:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1,305 +0,0 @@
-<!-- $Id: view_calendar_month.xsl 9174 2012-04-18 10:54:48Z vator $ -->
-<xsl:template match="data" name="view_check_lists"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format">d/m-Y</xsl:variable>
-<xsl:variable name="location_code"><xsl:value-of
select="location_array/location_code"/></xsl:variable>
-<xsl:variable name="view_location_code"><xsl:value-of
select="view_location_code"/></xsl:variable>
-
-<div id="main_content">
- <div id="control_plan">
- <div class="col_1">
- <h1><xsl:value-of
select="location_array/loc1_name"/></h1>
- <h3 style="margin:0;font-size:19px;">Kalenderoversikt
for <xsl:value-of select="period"/><span style="margin-left:5px;"><xsl:value-of
select="year"/></span></h3>
- </div>
-
- <div class="col_2">
- <form action="#">
- <input type="hidden" name="period_type"
value="view_year" />
- <input type="hidden" name="year">
- <xsl:attribute name="value">
- <xsl:value-of select="year"/>
- </xsl:attribute>
- </input>
-
- <select id="choose_my_location">
- <xsl:for-each select="my_locations">
- <xsl:variable
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
- <xsl:choose>
- <xsl:when
test="location_code = $view_location_code">
- <option
value="{$loc_code}" selected="selected">
-
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
- </option>
- </xsl:when>
- <xsl:otherwise>
- <option
value="{$loc_code}">
-
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
- </option>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </select>
- </form>
-
- <ul id="icon_color_map">
- <li><img height="15"
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt
opp</span></li>
- <li><img height="15"
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt
dato</span></li>
- <li><img height="15"
src="controller/images/status_icon_dark_green.png" /><span>Kontroll gjennomført
uten åpne saker før frist</span></li>
- <li><img height="15"
src="controller/images/status_icon_light_green.png" /><span>Kontroll
gjennomført uten åpne saker etter frist</span></li>
- <li><img height="15"
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført
med åpne saker</span></li>
- <li><img height="15"
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke
gjennomført</span></li>
- </ul>
- </div>
-
- <div id="cal_wrp">
- <script>
- $(document).ready(function() {
- $(".move_left").click(function(){
- var leftStrVal =
$("#days_view").css("left");
- var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
-
- if(leftNumVal == -417){
- $("#days_view").stop().animate({
- left: '-=93'
- }, 800);
- }else if(leftNumVal > -417){
- $("#days_view").stop().animate({
- left: '-=417'
- }, 800);
- }
- });
-
- $(".move_right").click(function(){
- var leftStrVal =
$("#days_view").css("left");
- var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
-
- if( leftNumVal != 0 ){
- if(leftNumVal == -93){
-
$("#days_view").stop().animate({
- left: '+=93'
- }, 800);
- }else if( leftNumVal >= -510 ){
-
$("#days_view").stop().animate({
- left: '+=417'
- }, 800);
- }
- }
- });
- });
- </script>
-
- <a style="font-weight: bold;font-size:
14px;float:left;">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
- <xsl:text>&year=</xsl:text>
- <xsl:value-of select="year"/>
- <xsl:text>&location_code=</xsl:text>
- <xsl:value-of select="$location_code"/>
- </xsl:attribute>
- Årsoversikt
- </a>
-
- <!-- ========================= NAVIGATION BETWEEN
FIRST AND LAST 14 DAYS IN DAYS CALENDAR
============================================================= -->
- <div class="nav">
- <a class="move_left" href="#"><img
src="controller/images/arrow_right.png" width="16"/></a>
- <a class="move_right" href="#"><img
src="controller/images/arrow_left.png" width="16"/></a>
- </div>
- <ul class="calendar month">
- <li class="heading">
- <div class="id">ID</div>
- <div class="title">Tittel</div>
- <div class="assigned">Tildelt</div>
- <div class="date">Startdato</div>
- <div class="date">Sluttdato</div>
- <div
class="frequency">Frekvenstype</div>
- <div
class="frequency">Frekvensintervall</div>
- </li>
- <xsl:choose>
- <xsl:when
test="controls_calendar_array/child::node()">
- <xsl:for-each select="controls_calendar_array">
- <li>
- <div class="id">
- <xsl:value-of
select="control/id"/>
- </div>
- <div class="title">
- <xsl:value-of
select="control/title"/>
- </div>
- <div class="assigned">
- <xsl:value-of
select="control/responsibility_name"/>
- </div>
- <div class="date">
- <xsl:value-of
select="php:function('date', $date_format, number(control/start_date))"/>
- </div>
- <div class="date">
- <xsl:choose>
- <xsl:when
test="control/end_date != 0">
- <xsl:value-of
select="php:function('date', $date_format, number(control/end_date))"/>
- </xsl:when>
- <xsl:otherwise>
- Løpende
- </xsl:otherwise>
- </xsl:choose>
- </div>
- <div class="frequency">
- <xsl:value-of
select="control/repeat_type"/>
- </div>
- <div class="frequency">
- <xsl:value-of
select="control/repeat_interval"/>
- </div>
- </li>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <div class="cal_info_msg">Ingen
sjekklister for bygg i angitt periode</div>
- </xsl:otherwise>
- </xsl:choose>
- </ul>
-
- <div id="days_wrp">
- <ul id="days_view" class="calendar days">
- <li class="heading">
- <xsl:for-each
select="heading_array">
- <div
class="cell"><xsl:value-of select="."/></div>
- </xsl:for-each>
- </li>
- <xsl:choose>
- <xsl:when
test="controls_calendar_array/child::node()">
- <xsl:for-each
select="controls_calendar_array">
- <li>
- <xsl:for-each
select="calendar_array">
- <xsl:choose>
-
<xsl:when test="status = 'CONTROL_REGISTERED'">
-
<div class="cell">
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-
<xsl:text>&date=</xsl:text>
-
<xsl:value-of select="info/date"/>
-
<xsl:text>&control_id=</xsl:text>
-
<xsl:value-of select="info/control_id"/>
-
<xsl:text>&location_code=</xsl:text>
-
<xsl:value-of select="$location_code"/>
-
</xsl:attribute>
-
<img height="15"
src="controller/images/status_icon_yellow_ring.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'CONTROL_PLANNED'">
-
<div class="cell">
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<img height="15" src="controller/images/status_icon_yellow.png"
/>
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
-
<div class="cell">
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<img height="15" src="controller/images/status_red_cross.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
-
<div class="cell">
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<span style="display:none"><xsl:value-of
select="info/id"/></span>
-
<img height="15"
src="controller/images/status_icon_dark_green.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
-
<div class="cell" style="position:relative;">
-
<div id="info_box"></div>
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<span style="display:none"><xsl:value-of
select="info/id"/></span>
-
<img height="15"
src="controller/images/status_icon_light_green.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'control_accomplished_with_errors'">
-
<div class="cell" style="position:relative;background:
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-
<div id="info_box"></div>
-
<a class="view_check_list">
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<span style="display:none">
-
<xsl:text>&check_list_id=</xsl:text><xsl:value-of
select="info/check_list_id"/>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
-
</span>
-
<xsl:value-of select="info/num_open_cases"/>
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'control_not_accomplished_with_info'">
-
<div class="cell" style="position:relative;">
-
<div id="info_box"></div>
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/check_list_id"/>
-
</xsl:attribute>
-
<span style="display:none"><xsl:value-of
select="info/id"/></span>
-
<img height="15"
src="controller/images/status_icon_red_cross.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'control_not_accomplished'">
-
<div class="cell">
-
<a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-
<xsl:text>&date=</xsl:text>
-
<xsl:value-of select="info/date"/>
-
<xsl:text>&control_id=</xsl:text>
-
<xsl:value-of select="info/control_id"/>
-
<xsl:text>&location_code=</xsl:text>
-
<xsl:value-of select="$location_code"/>
-
</xsl:attribute>
-
<img height="15"
src="controller/images/status_icon_red_cross.png" />
-
</a>
-
</div>
-
</xsl:when>
-
<xsl:when test="status = 'control_canceled'">
-
<div class="cell">
-
<img height="15"
src="controller/images/status_icon_red_cross.png" />
-
</div>
-
</xsl:when>
-
<xsl:otherwise>
-
<div class="cell"></div>
-
</xsl:otherwise>
-
</xsl:choose>
- </xsl:for-each>
- </li>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <div>Ingen sjekklister for bygg
i angitt periode</div>
- </xsl:otherwise>
- </xsl:choose>
- </ul>
- </div>
- </div>
-</div>
-</div>
-</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/cases_tab_menu.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/cases_tab_menu.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/cases_tab_menu.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -27,19 +27,5 @@
</xsl:attribute>
Lukkede saker
</a>
- <!--
- <a id="view_measurements">
- <xsl:if test="$active_tab = 'view_measurements'">
- <xsl:attribute
name="class">active</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_measurements</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Målinger
- </a>
- -->
</div>
</xsl:template>
Deleted:
branches/Version-1_0-branch/controller/templates/base/check_list/view_measurements.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/view_measurements.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_measurements.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1,76 +0,0 @@
-<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-
-<xsl:template match="data">
-
-<div id="view_cases">
-
- <xsl:call-template name="cases_tab_menu">
- <xsl:with-param
name="active_tab">view_measurements</xsl:with-param>
- </xsl:call-template>
-
- <div class="tab_item">
- <xsl:choose>
- <xsl:when test="measurement_check_items/child::node()">
-
- <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
-
- <ul id="check_list_not_fixed_list"
class="check_items expand_list">
- <xsl:for-each
select="measurement_check_items">
- <li>
- <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="control_item/title"/></span></h4>
- <form
class="frm_save_check_item expand_item"
action="index.php?menuaction=controller.uicheck_list.save_check_item"
method="post">
-
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
- <input
type="hidden" name="check_item_id" value="{$check_item_id}" />
- <input
type="hidden" name="type" value="control_item_type_2" />
-
- <div
class="check_item">
- <div>
-
<label>Status</label>
-
<select name="status">
-
<xsl:choose>
-
<xsl:when test="status = 0">
-
<option value="0" SELECTED="SELECTED">Ikke
utført</option>
-
<option value="1" >Utført</option>
-
</xsl:when>
-
<xsl:when test="status = 1">
-
<option value="0">Ikke utført</option>
-
<option value="1" SELECTED="SELECTED">Utført</option>
-
</xsl:when>
-
</xsl:choose>
-
</select>
- </div>
- <div>
-
<label>Målingsverdi</label>
-
<input>
-
<xsl:attribute name="name">measurement</xsl:attribute>
-
<xsl:attribute name="type">text</xsl:attribute>
-
<xsl:attribute name="value">
-
<xsl:if test="measurement > 0">
-
<xsl:value-of select="measurement"/>
-
</xsl:if>
-
</xsl:attribute>
-
</input>
- </div>
- <div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
-
<input type="submit" name="save_control" value="Oppdater måling"
class="not_active" title="{$lang_save}" />
-
</div>
- </div>
- </form>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen registrerte målinger
- </xsl:otherwise>
- </xsl:choose>
- </div>
-</div>
-</xsl:template>
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-05-02 08:17:55 UTC (rev 9254)
@@ -920,7 +920,7 @@
}
#control_plan .middle {
background: none repeat scroll 0 0 #EDF5FF;
- border-color: #DBE5EF #DBE5EF -moz-use-text-color;
+ border-color: #DBE5EF;
border-style: solid solid none;
border-width: 1px 1px 0;
clear: both;
@@ -1022,9 +1022,7 @@
margin-right: 10px;
width: 65px;
}
-.months_wrp a.view_check_list {
- width: 30px;
-}
+
.cal_info_msg{
font-size: 16px;
padding: 40px 20px;
@@ -1032,43 +1030,56 @@
/* ====================== CALENDAR INFO BOX ========================== */
+a.view_info_box {
+ color: #FFFFFF;
+ display: block;
+ font-size: 10px;
+ font-weight: bold;
+ left: 23px;
+ position: absolute;
+ text-decoration: none;
+ top: 8px;
+}
+.days_wrp a.view_info_box {
+ left: 8px;
+}
#info_box {
background: none repeat scroll 0 0 #EDF5FF;
- border: 1px solid #243356;
+ border: 1px solid #98B4D6;
+ display: none;
+ float: none;
+ font-size: 12px;
+ height: 200px;
left: 40px;
padding: 10px;
position: absolute;
text-align: left;
top: 3px;
- width: 350px;
+ width: 400px;
z-index: 1;
- font-size:12px;
- position:absolute;
- display:none;
}
-
-#info_box label{
- font-weight:bold;
- margin-right:2px;
- font-size:12px;
- display: inline-block;
- width: 70px;
+#info_box h3 {
+ background: none repeat scroll 0 0 #D1E3F8;
+ margin: 0 0 10px;
+ padding: 5px 0;
+ text-align: center;
}
-
-#info_box ul li ul label{
- display: inline;
-}
-
-#info_box ul li ul {
- margin: 5px 0;
- padding-left: 5px;
-}
#info_box h5 {
- font-size: 15px;
+ font-size: 13px;
font-weight: bold;
- padding: 0 0 8px;
- text-align: center;
+ margin: 0 0 4px;
+ text-align: left;
}
+#info_box .check_item {
+ width: 100%
+}
+#info_box .check_item label{
+ display:inline;
+ margin-left:20px;
+}
+#info_box .case {
+ text-align:left;
+}
.empty_list{
font-size: 16px;
font-weight: bold;
@@ -1422,16 +1433,8 @@
display: inline-block;
width: 18%;
}
-a.view_check_list{
- color: #FFFFFF;
- display: block;
- font-size: 10px;
- font-weight: bold;
- height: 13px;
- text-decoration: none;
- width: 24px;
-}
+
/* ================================ CASE MESSAGE =============================
*/
#caseMessage a#showMessage {
float: right;
Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -120,6 +120,8 @@
$app = lang($app);
$tpl_vars = array
(
+ 'noheader' =>
isset($GLOBALS['phpgw_info']['flags']['noheader_xsl']) &&
$GLOBALS['phpgw_info']['flags']['noheader_xsl'] ? 'true' : 'false',
+ 'nofooter' =>
isset($GLOBALS['phpgw_info']['flags']['nofooter']) &&
$GLOBALS['phpgw_info']['flags']['nofooter'] ? 'true' : 'false',
'css' => $GLOBALS['phpgw']->common->get_css(),
'javascript' => $GLOBALS['phpgw']->common->get_javascript(),
'img_icon' =>
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/head.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/head.tpl
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/head.tpl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -28,6 +28,8 @@
<!--
var border_layout_config = {border_layout_config};
var navbar_config = {navbar_config};
+ var noheader = {noheader};
+ var nofooter = {nofooter};
//-->
</script>
<!-- BEGIN javascript -->
Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
2012-05-02 08:17:55 UTC (rev 9254)
@@ -175,16 +175,28 @@
this.config.unitRightWidth = 6;
}
+ var header_height = 26;
+ if(noheader)
+ {
+ header_height = 0;
+ }
+
+ var footer_height = 26;
+ if(nofooter)
+ {
+ footer_height = 0;
+ }
+
this.layout = new YAHOO.widget.Layout({
minWidth: 600,
minHeight: 400,
units: [
- { position: 'top', body: layout['north'],
height: 26 },
+ { position: 'top', body: layout['north'],
height: header_height },
{ position: 'left', header: this.getHeader(
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth,
resize: true, scroll: true, gutter: "5px", collapse: false, maxWidth: 300,
minWidth: 6 },
{ position: 'center', header: this.getHeader( layout['center']
), body: layout['center'], scroll: true, gutter: "5px 0px" },
// Uncomment for make use of east-layout
// { position: 'right', header: this.getHeader( layout['east']
), body: layout['east'], width: this.config.unitRightWidth, resize: true,
scroll: true, gutter: "5px", collapse: false, maxWidth: 300, minWidth: 6 },
- { position: 'bottom', body: layout['south'], height: 26 }
+ { position: 'bottom', body: layout['south'], height:
footer_height }
]
});
Modified: branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -368,7 +368,7 @@
function select_dimb_list($selected='')
{
- $dimbs=$this->so->select_dimb_list();
+ $dimbs=$this->so->select_dimb_list($selected);
return $this->bocommon->select_list($selected,$dimbs);
}
@@ -768,11 +768,16 @@
return $line;
}
- function check_role()
+ function check_role($dimb = 0)
{
- return $this->so->check_role();
+ return $this->so->check_role($dimb);
}
+ public function get_dimb_role_user($role_id, $dimb = '',
$selected = '')
+ {
+ return $this->so->get_dimb_role_user($role_id, $dimb,
$selected);
+ }
+
public function get_historical_accounting_periods()
{
return $this->so->get_historical_accounting_periods();
@@ -815,4 +820,33 @@
{
return $this->so->update_voucher2($data);
}
+
+ function get_approve_role($dimb = 0)
+ {
+ $role_check = array
+ (
+ 'is_janitor' =>
lang('janitor'),
+ 'is_supervisor' =>
lang('supervisor'),
+ 'is_budget_responsible' => lang('b -
responsible')
+ );
+
+ $roles = $this->check_role($dimb);
+
+ $approve = array();
+ foreach ($roles as $role => $role_value)
+ {
+ if ($role_value && isset($role_check[$role]))
+ {
+ $approve[] = array
+ (
+ 'id' => $role,
+ 'name' =>
$role_check[$role],
+ 'selected' => 0
+ );
+ }
+ }
+ return $approve;
+ }
+
+
}
Modified: branches/Version-1_0-branch/property/inc/class.bolookup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bolookup.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.bolookup.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -326,10 +326,19 @@
}
function read_ecodimb()
{
+ $config =
CreateObject('phpgwapi.config','property');
+ $config->read();
+
+ $custom_criteria = array();
+ if(isset($config->config_data['invoice_acl']) &&
$config->config_data['invoice_acl'] == 'dimb')
+ {
+ $custom_criteria = array('dimb_role_user');
+ }
+
$ecodimb = CreateObject('property.sogeneric');
$ecodimb->get_location_info('dimb',false);
$values = $ecodimb->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
- 'allrows'=>$this->allrows));
+ 'allrows'=>$this->allrows, 'custom_criteria' =>
$custom_criteria));
$this->total_records = $ecodimb->total_records;
Modified: branches/Version-1_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.menu.inc.php 2012-05-02
06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.menu.inc.php 2012-05-02
08:17:55 UTC (rev 9254)
@@ -206,11 +206,24 @@
'text' =>
lang('Accounting dim b'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index', 'type' => 'dimb') )
),
+/*
'dimb_roles' => array
(
'text' => lang('dimb
roles'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.uicategories.index', 'appname' => 'property', 'location' =>
'.invoice.dimb', 'global_cats' => 'true', 'menu_selection' =>
'admin::property::accounting::dimb_roles') )
),
+*/
+ 'dimb_role' => array
+ (
+ 'text' => lang('dimb
roles'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index', 'type' => 'dimb_role') )
+ ),
+ 'dimb_role_user' => array
+ (
+ 'text' => lang('dimb
role user'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index', 'type' => 'dimb_role_user') )
+ ),
+
'accounting_dimd' => array
(
'text' =>
lang('Accounting dim d'),
Modified: branches/Version-1_0-branch/property/inc/class.soXport.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soXport.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.soXport.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -195,7 +195,7 @@
{
$id = (int) $id;
$sql = "SELECT project_group FROM fm_workorder"
- . " $this->join fm_project ON
fm_workorder.project_id = fm_project.id WHERE fm_workorder.id={$id}";
+ . " {$this->join} fm_project ON
fm_workorder.project_id = fm_project.id WHERE fm_workorder.id={$id}";
$this->db->query($sql, __LINE__, __FILE__);
$this->db->next_record();
return $this->db->f('project_group');
Modified: branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -53,11 +53,12 @@
function read($data, $filter = array())
{
- $start = isset($data['start']) &&
$data['start'] ? $data['start']:0;
- $query =
isset($data['query'])?$data['query']:'';
- $sort = isset($data['sort']) && $data['sort']
? $data['sort']:'DESC';
- $order =
isset($data['order'])?$data['order']:'';
- $allrows =
isset($data['allrows'])?$data['allrows']:'';
+ $start = isset($data['start'])
&& $data['start'] ? $data['start'] : 0;
+ $query = isset($data['query'])
? $data['query']:'';
+ $sort = isset($data['sort'])
&& $data['sort'] ? $data['sort'] : 'DESC';
+ $order = isset($data['order'])
? $data['order'] : '';
+ $allrows =
isset($data['allrows']) ? $data['allrows'] : '';
+ $custom_criteria =
isset($data['custom_criteria']) && $data['custom_criteria'] ?
$data['custom_criteria'] : array();
$values = array();
if (!isset($this->location_info['table']) || !$table =
$this->location_info['table'])
@@ -65,6 +66,24 @@
return $values;
}
+
+ $_join_method = array();
+ $_filter_array = array();
+ if($custom_criteria)
+ {
+ foreach ($custom_criteria as $_custom_criteria)
+ {
+
if(isset($this->location_info['custom_criteria'][$_custom_criteria]['join']) &&
is_array($this->location_info['custom_criteria'][$_custom_criteria]['join']))
+ {
+ $_join_method =
array_merge($_join_method,
$this->location_info['custom_criteria'][$_custom_criteria]['join']);
+ }
+
if(isset($this->location_info['custom_criteria'][$_custom_criteria]['filter'])
&&
is_array($this->location_info['custom_criteria'][$_custom_criteria]['filter']))
+ {
+ $_filter_array =
array_merge($_filter_array,
$this->location_info['custom_criteria'][$_custom_criteria]['filter']);
+ }
+ }
+ }
+
/*
$valid_order = false;
@@ -93,7 +112,7 @@
}
}
*/
- $_filter_array = array();
+
$get_single = array();
foreach ( $this->location_info['fields'] as $field )
{
@@ -291,8 +310,10 @@
$querymethod .= $_query_end;
}
- $sql = "SELECT * FROM $table {$filtermethod}
{$querymethod}";
+ $join_method = $_join_method ? implode (' ',
$_join_method) : '';
+ $sql = "SELECT DISTINCT {$table}.* FROM {$table}
{$join_method} {$filtermethod} {$querymethod}";
+
$this->_db->query('SELECT count(*) as cnt ' .
substr($sql,strripos($sql,'from')),__LINE__,__FILE__);
$this->_db->next_record();
$this->total_records = $this->_db->f('cnt');
@@ -462,6 +483,14 @@
'type' =>
'varchar'
)
),
+ 'custom_criteria' => array
+ (
+ 'dimb_role_user' =>
array
+ (
+ 'join'
=> array("{$this->_db->join} fm_ecodimb_role_user ON fm_ecodimb.id =
fm_ecodimb_role_user.ecodimb"),
+ 'filter'
=> array('fm_ecodimb_role_user.user_id = ' . (int) $this->account)
+ )
+ ),
'edit_msg' => lang('edit'),
'add_msg' => lang('add'),
'name' => lang('dimb'),
@@ -1065,6 +1094,29 @@
'menu_selection' =>
'admin::property::accounting::accounting_cats'
);
break;
+
+ case 'dimb_role':
+ $info = array
+ (
+ 'table'
=> 'fm_ecodimb_role',
+ 'id'
=> array('name' => 'id', 'type' => 'int'),
+ 'fields'
=> array
+ (
+ array
+ (
+ 'name' =>
'name',
+ 'descr' =>
lang('name'),
+ 'type' =>
'varchar'
+ )
+ ),
+ 'edit_msg'
=> lang('edit role'),
+ 'add_msg'
=> lang('add role'),
+ 'name'
=> lang('dimb role'),
+ 'acl_app'
=> 'property',
+ 'acl_location' =>
'.admin',
+ 'menu_selection' =>
'admin::property::accounting::dimb_role'
+ );
+ break;
//-------- ID type varchar
case 'project_status':
$info = array
@@ -1444,6 +1496,81 @@
break;
//-------- ID type auto
+
+ case 'dimb_role_user':
+
+ $info = array
+ (
+ 'table'
=> 'fm_ecodimb_role_user',
+ 'id'
=> array('name' => 'id', 'type' => 'auto'),
+ 'fields'
=> array
+ (
+ array
+ (
+ 'name'
=> 'ecodimb',
+ 'descr'
=> lang('dim b'),
+ 'type'
=> 'select',
+ 'nullable'
=> false,
+ 'filter'
=> true,
+ 'sortable'
=> true,
+ 'values_def'
=> array
+ (
+
'valueset' => false,
+
'method' => 'property.bogeneric.get_list',
+
'method_input' => array('type' => 'dimb', 'selected' =>
'##ecodimb##')//b_account_category
+ )
+ ),
+ array
+ (
+ 'name'
=> 'role_id',
+ 'descr'
=> lang('role type'),
+ 'type'
=> 'select',
+ 'filter'
=> true,
+ 'sortable'
=> true,
+ 'values_def'
=> array
+ (
+
'valueset' => false,
+
'method' => 'property.bogeneric.get_list',
+
'method_input' => array('type' => 'dimb_role', 'selected' => '##role_id##')
+ )
+ ),
+ array
+ (
+ 'name'
=> 'user_id',
+ 'descr'
=> lang('user'),
+ 'type'
=> 'select',
+ 'filter'
=> true,
+ 'get_single'
=> 'get_user',
+ 'values_def'
=> array
+ (
+
'valueset' => false,
+
'method' => 'property.bocommon.get_user_list_right2',
+
'method_input' => array('selected' => '##user_id##', 'right' => 1,
'acl_location' => '.invoice')
+ )
+ ),
+ array
+ (
+ 'name' =>
'default_user',
+ 'descr' =>
lang('default'),
+ 'type' =>
'checkbox',
+ 'default' =>
'checked'
+ ),
+ ),
+ 'edit_msg'
=> lang('edit'),
+ 'add_msg'
=> lang('add'),
+ 'name'
=> lang('dimb role'),
+ 'acl_app'
=> 'property',
+ 'acl_location' =>
'.admin',
+ 'menu_selection' =>
'admin::property::accounting::dimb_role_user',
+ 'default'
=> array
+ (
+ 'created_by'
=> array('add' => '$this->account'),
+ 'created_on'
=> array('add' => 'time()'),
+ ),
+ 'check_grant' =>
false
+ );
+ break;
+
case 'order_dim1':
$info = array
(
Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -441,18 +441,18 @@
$invoice = array();
while ($this->db->next_record())
{
- $status_line = 'O';
+ $status_line = 0;
if($this->db->f('budsjettsigndato'))
{
- $status_line = 'C';
+ $status_line = 3;
}
else if($this->db->f('saksigndato'))
{
- $status_line = 'B';
+ $status_line = 2;
}
else if($this->db->f('oppsynsigndato'))
{
- $status_line = 'A';
+ $status_line = 1;
}
$invoice[] = array
@@ -867,10 +867,11 @@
$this->db->next_record();
switch ( $this->db->f('type') )
{
- case 'workorder':
-
$historylog_workorder->add($entry,$id,$status_code[$entry]);
-
$GLOBALS['phpgw']->db->query("UPDATE fm_workorder set status=" .
"'$status_code[$entry]'" . "where id=$id");
- $receipt['message'][] =
array('msg'=>lang('Workorder %1 is %2',$id, $status_code[$entry]));
+ case 'workorder':
+
$historylog_workorder->add($entry,$id,$status_code[$entry]);
+
$GLOBALS['phpgw']->db->query("UPDATE fm_workorder set status=" .
"'{$status_code[$entry]}'" . "where id=$id");
+ $receipt['message'][] =
array('msg'=>lang('Workorder %1 is %2',$id, $status_code[$entry]));
+ break;
}
}
}
@@ -1033,10 +1034,32 @@
return $this->db->f('merknad');
}
- function check_role()
+ function check_role($dimb = 0)
{
- if(!isset($this->role) || !$this->role)
+ if($this->role && !$dimb)
{
+ return $this->role;
+ }
+
+ if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $dimb = (int) $dimb;
+ $filter_dimb = $dimb ? "AND ecodimb = {$dimb}"
: '';
+ $this->db->query("SELECT user_id FROM
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 1
{$filter_dimb} AND expired_on IS NULL");
+ $this->db->next_record();
+ $this->role['is_janitor'] =
!!$this->db->f('user_id');
+
+ $this->db->query("SELECT user_id FROM
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 2
{$filter_dimb} AND expired_on IS NULL");
+ $this->db->next_record();
+ $this->role['is_supervisor'] =
!!$this->db->f('user_id');
+
+ $this->db->query("SELECT user_id FROM
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 3
{$filter_dimb} AND expired_on IS NULL");
+ $this->db->next_record();
+ $this->role['is_budget_responsible'] =
!!$this->db->f('user_id');
+
+ }
+ else
+ {
$this->role = array(
'is_janitor'
=> $this->acl->check('.invoice', 32, 'property'),
'is_supervisor'
=> $this->acl->check('.invoice', 64, 'property'),
@@ -1047,6 +1070,32 @@
return $this->role;
}
+ function get_dimb_role_user($role_id, $dimb = '', $selected =
'')
+ {
+ $filter_dimb = $dimb ? "AND ecodimb = {$dimb}" : '';
+ $role_id = (int) $role_id;
+ $sql = "SELECT DISTINCT account_lid,account_lastname,
account_firstname FROM fm_ecodimb_role_user"
+ ." {$this->db->join} phpgw_accounts ON
fm_ecodimb_role_user.user_id = phpgw_accounts.account_id"
+ ." WHERE role_id = {$role_id} {$filter_dimb} AND
expired_on IS NULL"
+ ." ORDER BY account_lastname ASC, account_firstname
ASC";
+
+//_debug_array($sql);
+ $this->db->query($sql,__LINE__,__FILE__);
+
+ $values = array();
+ while($this->db->next_record())
+ {
+ $id = $this->db->f('account_lid');
+ $values[] = array
+ (
+ 'id' => $id,
+ 'name' =>
$this->db->f('account_lastname') . ', ' . $this->db->f('account_firstname'),
+ 'selected' => $selected == $id ? 1
: 0
+ );
+ }
+ return $values;
+ }
+
function check_count($voucher_id)
{
@@ -1198,17 +1247,47 @@
}
//----------
- function select_dimb_list()
+ function select_dimb_list($selected = 0)
{
- $this->db->query("SELECT * FROM fm_ecodimb order by id
asc ");
+ $selected = (int) $selected;
+ $include_selected = false;
+
+ if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $sql = "SELECT fm_ecodimb.* FROM fm_ecodimb
{$this->db->join} fm_ecodimb_role_user ON fm_ecodimb.id =
fm_ecodimb_role_user.ecodimb"
+ . ' WHERE fm_ecodimb_role_user.user_id = ' .
(int) $this->account_id . ' ORDER BY descr ASC';
+ $include_selected = true;
+ }
+ else
+ {
+ $sql = "SELECT * FROM fm_ecodimb ORDER BY descr
ASC";
+ }
+
+ $selected_found = false;
+ $this->db->query($sql);
$dimb_list = array();
while ($this->db->next_record())
{
- $dimb_list[] = Array(
- 'id' => $this->db->f('id'),
- 'name' => $this->db->f('descr')
+ $id = $this->db->f('id');
+ if($id == $selected)
+ {
+ $selected_found = true;
+ }
+
+ $dimb_list[] = array
+ (
+ 'id' => $id,
+ 'name' =>
$this->db->f('descr',true)
);
}
+
+ if($include_selected && $selected && !$selected_found)
+ {
+ $this->db->query("SELECT descr FROM fm_ecodimb
WHERE id={$selected}");
+ $this->db->next_record();
+ array_unshift($dimb_list, array ('id' =>
$selected, 'name' => '**' . $this->db->f('descr',true) . '**' ) );
+ }
+
return $dimb_list;
}
@@ -1883,12 +1962,25 @@
$value_set_line['line_text'] =
$data['line_text'];
$value_set_line =
$this->db->validate_update($value_set_line);
- $this->db->query("UPDATE fm_ecobilag SET
$value_set_line WHERE id = " . (int)$data['line_id'],__LINE__,__FILE__);
+ $this->db->query("UPDATE fm_ecobilag SET
{$value_set_line} WHERE id = " . (int)$data['line_id'],__LINE__,__FILE__);
unset($value_set_line);
+ //update workorder
if($data['order_id'] && $data['b_account_id'])
{
- $this->db->query("UPDATE fm_workorder SET
account_id = '{$data['b_account_id']}' WHERE id='{$data['order_id']}'");
+ $this->db->query("SELECT type FROM fm_orders
WHERE id={$data['order_id']}",__LINE__,__FILE__);
+ $this->db->next_record();
+ switch ( $this->db->f('type') )
+ {
+ case 'workorder':
+ $value_set_line['account_id']
= $data['b_account_id'];
+ $value_set_line['category']
= $data['dim_e'];
+
+ $value_set_line =
$this->db->validate_update($value_set_line);
+ $this->db->query("UPDATE
fm_workorder SET {$value_set_line} WHERE id='{$data['order_id']}'");
+ unset($value_set_line);
+ break;
+ }
}
foreach($data['approved_amount'] as $line_id =>
$approved_amount)
@@ -1926,9 +2018,8 @@
$this->db->query("SELECT belop FROM
{$table} WHERE id={$id}",__LINE__,__FILE__);
$this->db->next_record();
$amount = $this->db->f('belop');
- $new_amount = $amount - $split_amount;
- if($new_amount < 0)
+ if(($amount - $split_amount) < 0)
{
phpgwapi_cache::message_set(lang('negative sum'), 'error');
continue;
@@ -1958,16 +2049,17 @@
$value_set= array
(
- 'belop' =>
$new_amount,
- 'godkjentbelop' => $new_amount,
+ 'belop' =>
$split_amount,
+ 'godkjentbelop' => $split_amount
);
$value_set =
$this->db->validate_update($value_set);
$this->db->query("UPDATE {$table} SET
$value_set WHERE id= {$id}" ,__LINE__,__FILE__);
$value_set= array
(
- 'belop' =>
$split_amount,
- 'godkjentbelop' =>
$split_amount,
+ 'belop' =>
$amount - $split_amount,
+ 'godkjentbelop' => $amount -
$split_amount,
+ 'splitt' => $id
);
$value_set =
$this->db->validate_update($value_set);
$this->db->query("UPDATE {$table} SET
$value_set WHERE id= {$new_id}" ,__LINE__,__FILE__);
@@ -2072,12 +2164,11 @@
$where = 'AND';
}
- $sql = "SELECT DISTINCT bilagsnr,bilagsnr_ut, org_name,
currency, kreditnota, fm_ecoart.descr as type, sum(godkjentbelop) as
godkjentbelop, oppsynsigndato, saksigndato,budsjettsigndato"
+ $sql = "SELECT bilagsnr,bilagsnr_ut, org_name,
currency, kreditnota, fm_ecoart.descr as type, godkjentbelop, oppsynsigndato,
saksigndato,budsjettsigndato"
." FROM fm_ecobilag"
." {$this->join} fm_vendor ON fm_vendor.id =
fm_ecobilag.spvend_code"
." {$this->join} fm_ecoart ON fm_ecoart.id =
fm_ecobilag.artid"
- ." $filtermethod $querymethod"
- ." GROUP BY bilagsnr,bilagsnr_ut, org_name, currency,
kreditnota, fm_ecoart.descr, oppsynsigndato, saksigndato,budsjettsigndato";
+ ." $filtermethod $querymethod ORDER BY bilagsnr";
$lang_voucer = lang('voucher id');
$lang_vendor = lang('vendor');
@@ -2091,38 +2182,64 @@
while($this->db->next_record())
{
- $status = 'O';
+ $bilagsnr = $this->db->f('bilagsnr');
+
+ $values[$bilagsnr]['bilagsnr_ut']
= $this->db->f('bilagsnr_ut');
+ $values[$bilagsnr]['org_name']
= $this->db->f('org_name');
+ $values[$bilagsnr]['currency']
= $this->db->f('currency');
+ $values[$bilagsnr]['kreditnota']
= $this->db->f('kreditnota');
+ $values[$bilagsnr]['type']
= $this->db->f('type');
+
+ if(isset($values[$bilagsnr]['godkjentbelop']))
+ {
+ $values[$bilagsnr]['godkjentbelop'] +=
$this->db->f('godkjentbelop');
+ }
+ else
+ {
+ $values[$bilagsnr]['godkjentbelop'] =
$this->db->f('godkjentbelop');
+ }
+
+ $status = 0;
if($this->db->f('budsjettsigndato'))
{
- $status = 'C';
+ $status = 3;
}
else if($this->db->f('saksigndato'))
{
- $status = 'B';
+ $status = 2;
}
else if($this->db->f('oppsynsigndato'))
{
- $status = 'A';
+ $status = 1;
}
- $voucher_id = $this->db->f('bilagsnr_ut') ?
$this->db->f('bilagsnr_ut') : $this->db->f('bilagsnr');
+ $values[$bilagsnr]['status'][] = $status;
+ }
+
+ $voucers = array();
+ foreach ($values as $bilagsnr => $entry)
+ {
+ $status = $entry['status'];
+ sort($status);
+
+ $voucher_id = $entry['bilagsnr_ut'] ?
$entry['bilagsnr_ut'] : $bilagsnr;
$name = sprintf("{$lang_voucer}:% 8s |
{$lang_vendor}:% 20s | {$lang_currency}:% 3s | {$lang_parked}: % 1s |
{$lang_type}: % 12s | {$lang_approved_amount}: % 19s | Status: % 1s",
$voucher_id,
-
trim(strtoupper($this->db->f('org_name',true))),
-
$this->db->f('currency'),
-
$this->db->f('kreditnota') ? 'X' : '',
- $this->db->f('type'),
-
number_format($this->db->f('godkjentbelop'), 2, ',', ' '),
- $status
+
trim(strtoupper($entry['org_name'])),
+ $entry['currency'],
+ $entry['kreditnota'] ?
'X' : '',
+ $entry['type'],
+
number_format($entry['godkjentbelop'], 2, ',', ' '),
+ $status[0]
);
- $values[] = array
+ $voucers[] = array
(
- 'id' => $this->db->f('bilagsnr'),
+ 'id' => $bilagsnr,
'name' => $name
);
}
- return $values;
+
+ return $voucers;
}
-
}
Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1211,10 +1211,16 @@
$this->db->transaction_begin();
- $this->db->query("UPDATE fm_workorder SET $value_set
WHERE id= {$workorder['id']}" ,__LINE__,__FILE__);
+ $this->db->query("UPDATE fm_workorder SET {$value_set}
WHERE id= {$workorder['id']}" ,__LINE__,__FILE__);
- $this->db->query("UPDATE fm_ecobilag SET spbudact_code
= '{$workorder['b_account_id']}' WHERE pmwrkord_code = '{$workorder['id']}'"
,__LINE__,__FILE__);
+ $value_set_invoice = array();
+ $value_set_invoice['spbudact_code'] =
$workorder['b_account_id'];
+ $value_set_invoice['dime'] =
$workorder['cat_id'];
+ $value_set_invoice =
$this->bocommon->validate_db_update($value_set_invoice);
+
+ $this->db->query("UPDATE fm_ecobilag SET
{$value_set_invoice} WHERE pmwrkord_code = '{$workorder['id']}'"
,__LINE__,__FILE__);
+
/* if($workorder['charge_tenant'])
{
$this->db->query("UPDATE fm_project set
charge_tenant = 1 WHERE id =" . $workorder['project_id']);
Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1760,7 +1760,7 @@
if( phpgw::get_var('phpgw_return_as') == 'json' &&
is_array($values) && isset($values))
{
- if($this->get_approve_role())
+ if($this->bo->get_approve_role())
{
$receipt =
$this->bo->update_invoice_sub($values);
}
@@ -2299,7 +2299,7 @@
'is_budget_responsible' => lang('b -
responsible')
);
- $approve = $this->get_approve_role();
+ $approve = $this->bo->get_approve_role();
$values = phpgw::get_var('values');
@@ -3783,14 +3783,17 @@
$order_id = phpgw::get_var('order_id'); // could
be bigint
$soXport = CreateObject('property.soXport');
+ $nonavbar = phpgw::get_var('nonavbar', 'bool');
+ $lean = phpgw::get_var('lean', 'bool');
+
$order_type = $soXport->check_order($order_id);
switch($order_type)
{
case 'workorder':
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiworkorder.edit', 'id'=> $order_id, 'tab' => 'budget'));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiworkorder.edit', 'id'=> $order_id, 'tab' => 'budget', 'nonavbar' =>
$nonavbar, 'lean' => $lean));
break;
case 's_agreement':
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uis_agreement.view', 'id'=> $order_id));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uis_agreement.view', 'id'=> $order_id, 'nonavbar' => $nonavbar,
'lean' => $lean));
break;
default:
$GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
@@ -3894,7 +3897,7 @@
'is_budget_responsible' => lang('b -
responsible')
);
- $approve = $this->get_approve_role();
+ $approve = $this->bo->get_approve_role();
$values = phpgw::get_var('values');
@@ -4038,30 +4041,4 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('forward' => $data));
}
- function get_approve_role()
- {
- $role_check = array
- (
- 'is_janitor' =>
lang('janitor'),
- 'is_supervisor' =>
lang('supervisor'),
- 'is_budget_responsible' => lang('b -
responsible')
- );
-
- $roles = $this->bo->check_role();
-
- $approve = array();
- foreach ($roles as $role => $role_value)
- {
- if ($role_value && isset($role_check[$role]))
- {
- $approve[] = array
- (
- 'id' => $role,
- 'name' =>
$role_check[$role],
- 'selected' => 0
- );
- }
- }
- return $approve;
- }
}
Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -45,12 +45,7 @@
var $type_id;
var $location_code;
- private $so_control_area;
- private $so_control;
- private $so_check_list;
- private $so_control_item;
- private $so_check_item;
- private $so_procedure;
+ private $config;
var $public_functions = array
(
@@ -82,6 +77,9 @@
// self::set_active_menu('property::invoice::invoice2');
$GLOBALS['phpgw_info']['flags']['menu_selection'] =
'property::invoice::invoice2';
+ $this->config =
CreateObject('phpgwapi.config','property');
+ $this->config->read();
+
}
public function add_javascript($app, $pkg, $name)
@@ -134,7 +132,7 @@
if($values = phpgw::get_var('values'))
{
- $approve =
execMethod('property.uiinvoice.get_approve_role');
+ $approve =
execMethod('property.boinvoice.get_approve_role', $values['dim_b']);
if(!$approve)
{
@@ -190,15 +188,33 @@
return $this->query();
}
- $janitor_list =
$this->bocommon->get_user_list_right(32,$janitor,'.invoice');
- $supervisor_list =
$this->bocommon->get_user_list_right(64,$supervisor,'.invoice');
- $budget_responsible_list =
$this->bocommon->get_user_list_right(128,$budget_responsible,'.invoice');
+ if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $janitor_list =
$this->bo->get_dimb_role_user(1,'', $janitor);
+ $supervisor_list =
$this->bo->get_dimb_role_user(2,'', $supervisor);
+ $budget_responsible_list =
$this->bo->get_dimb_role_user(3,'', $budget_responsible);
+ }
+ else
+ {
+ $janitor_list =
$this->bocommon->get_user_list_right(32,$janitor,'.invoice');
+ $supervisor_list =
$this->bocommon->get_user_list_right(64,$supervisor,'.invoice');
+ $budget_responsible_list =
$this->bocommon->get_user_list_right(128,$budget_responsible,'.invoice');
+ }
$userlist_default = array();
$userlist_default[] = array('id'=> '*' .
$GLOBALS['phpgw']->accounts->get($this->account_id)->lid, 'name'=>lang('mine
vouchers'));
$userlist_default[] = array('id'=>'','name'=>lang('no
user'));
- $voucher_list = array('id' => '', 'name' =>
lang('select'));
+ $voucher_list = array();
+ if($voucher_id)
+ {
+ $voucher_list =
$this->bo->get_vouchers(array('query' => $voucher_id ));
+ }
+
+ if(!$voucher_list)
+ {
+ $voucher_list = array('id' => '', 'name' =>
lang('select'));
+ }
foreach($userlist_default as $default)
{
@@ -217,8 +233,6 @@
$user = $GLOBALS['phpgw']->accounts->get(
$GLOBALS['phpgw_info']['user']['id'] );
-
-
$myColumnDefs = array();
$datavalues = array();
$myButtons = array();
@@ -226,7 +240,7 @@
$datavalues[] = array
(
'name' => "0",
- 'values' =>
json_encode(array()),
+ 'values' =>
$this->query(),//json_encode(array()),
'total_records' => 0,
'permission' => "''",
'is_paginator' => 1,
@@ -371,8 +385,7 @@
'voucher_list' =>
array('options' => $voucher_list),
),
'voucher_info'
=> $this->get_single_line($line_id),
- 'update_action'
=> self::link(array('menuaction' => 'property.uiinvoice2.update_voucher')),
- 'datatable_old'
=> array()//$datatable_old;
+ 'update_action'
=> self::link(array('menuaction' => 'property.uiinvoice2.update_voucher'))
);
//_debug_array($data);die();
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
@@ -396,6 +409,8 @@
self::add_javascript('property', 'portico',
'ajax_invoice.js');
self::add_javascript('property', 'yahoo',
'invoice2.index.js');
+ self::add_javascript('property', 'tinybox2',
'packed.js');
+
$GLOBALS['phpgw']->css->add_external_file('property/js/tinybox2/style.css');
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice2'));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));
@@ -505,12 +520,26 @@
$sign_orig = '';
$my_initials =
$GLOBALS['phpgw_info']['user']['account_lid'];
-
+
if(count($voucher))
{
//---------start forward
- $approve =
execMethod('property.uiinvoice.get_approve_role');
+
+
if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $janitor_list
= $this->bo->get_dimb_role_user(1,$voucher[0]['dim_b'],
isset($voucher[0]['janitor'])?$voucher[0]['janitor']:'');
+ $supervisor_list
= $this->bo->get_dimb_role_user(2,$voucher[0]['dim_b'],
isset($voucher[0]['supervisor'])?$voucher[0]['supervisor']:'');
+ $budget_responsible_list =
$this->bo->get_dimb_role_user(3,$voucher[0]['dim_b'],
isset($voucher[0]['budget_responsible'])?$voucher[0]['budget_responsible']:'');
+ }
+ else
+ {
+ $janitor_list
=
$this->bocommon->get_user_list_right(32,isset($voucher[0]['janitor'])?$voucher[0]['janitor']:'','.invoice');
+ $supervisor_list
=
$this->bocommon->get_user_list_right(64,isset($voucher[0]['supervisor'])?$voucher[0]['supervisor']:'','.invoice');
+ $budget_responsible_list =
$this->bocommon->get_user_list_right(128,isset($voucher[0]['budget_responsible'])?$voucher[0]['budget_responsible']:'','.invoice');
+ }
+
+ $approve =
execMethod('property.boinvoice.get_approve_role', $voucher[0]['dim_b']);
$approved_list[] = array
(
@@ -518,7 +547,7 @@
'role_sign' => 'oppsynsmannid',
'initials' =>
$voucher[0]['janitor'] ? $voucher[0]['janitor'] : '',
'date' =>
$voucher[0]['oppsynsigndato'] ? $GLOBALS['phpgw']->common->show_date(
strtotime( $voucher[0]['oppsynsigndato'] ) ) :'',
- 'user_list' =>
!$voucher[0]['oppsynsigndato'] ? array('options' =>
$this->bocommon->get_user_list_right(32,isset($voucher[0]['janitor'])?$voucher[0]['janitor']:'','.invoice'))
: ''
+ 'user_list' =>
!$voucher[0]['oppsynsigndato'] ? array('options' => $janitor_list) : ''
);
$approved_list[] = array
(
@@ -526,7 +555,7 @@
'role_sign' => 'saksbehandlerid',
'initials' =>
$voucher[0]['supervisor'] ? $voucher[0]['supervisor'] : '',
'date' =>
$voucher[0]['saksigndato'] ? $GLOBALS['phpgw']->common->show_date( strtotime(
$voucher[0]['saksigndato'] ) ) :'',
- 'user_list' =>
!$voucher[0]['saksigndato'] ? array('options' =>
$this->bocommon->get_user_list_right(64,isset($voucher[0]['supervisor'])?$voucher[0]['supervisor']:'','.invoice'))
: ''
+ 'user_list' =>
!$voucher[0]['saksigndato'] ?array('options' => $supervisor_list) : ''
);
$approved_list[] = array
(
@@ -534,7 +563,7 @@
'role_sign' =>
'budsjettansvarligid',
'initials' =>
$voucher[0]['budget_responsible'] ? $voucher[0]['budget_responsible'] : '',
'date' =>
$voucher[0]['budsjettsigndato'] ? $GLOBALS['phpgw']->common->show_date(
strtotime( $voucher[0]['budsjettsigndato'] ) ) :'',
- 'user_list' =>
!$voucher[0]['budsjettsigndato'] ? array('options' =>
$this->bocommon->get_user_list_right(128,isset($voucher[0]['budget_responsible'])?$voucher[0]['budget_responsible']:'','.invoice'))
: ''
+ 'user_list' =>
!$voucher[0]['budsjettsigndato'] ? array('options' => $budget_responsible_list)
: ''
);
foreach($approved_list as &$_approved_list)
Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1108,6 +1108,22 @@
$save=true;
+
if(isset($config->config_data['invoice_acl']) &&
$config->config_data['invoice_acl'] == 'dimb')
+ {
+ if(!isset($values['ecodimb'])
|| !$values['ecodimb'])
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select dimb!'));
+ $error_id=true;
+ }
+
+ $approve_role =
execMethod('property.boinvoice.check_role', $values['ecodimb']);
+ if(
!$approve_role['is_supervisor'] && ! $approve_role['is_budget_responsible'])
+ {
+
$receipt['error'][]=array('msg'=>lang('you are not approved for this dimb: %1',
$values['ecodimb'] ));
+ $error_id=true;
+ }
+ }
+
if(!isset($values['location']))
{
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
Modified: branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1223,6 +1223,7 @@
{
$values_hour = $common_data['content'];
}
+
$project =
$this->boproject->read_single($common_data['workorder']['project_id'],array(),true);
$bolocation = CreateObject('property.bolocation');
@@ -1442,6 +1443,21 @@
if($to_email || $print ||
($workorder['mail_recipients'][0] && $_POST['send_order']))
{
+
if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $approve_role =
execMethod('property.boinvoice.check_role', $project['ecodimb'] ?
$project['ecodimb'] : $workorder['ecodimb']);
+ if(!$approve_role['is_supervisor'] && !
$approve_role['is_budget_responsible'] && !$workorder['approved'])
+ {
+ phpgwapi_cache::message_set(
lang('you are not approved for this dimb: %1', $project['ecodimb'] ?
$project['ecodimb'] : $workorder['ecodimb'] ), 'error' );
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiwo_hour.view', 'workorder_id'=> $workorder_id, 'from' =>
phpgw::get_var('from')));
+ }
+ if(!$workorder['approved'])
+ {
+ phpgwapi_cache::message_set(
lang('order is not approved'), 'error' );
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiwo_hour.view', 'workorder_id'=> $workorder_id, 'from' =>
phpgw::get_var('from')));
+ }
+ }
+
$_to = isset($workorder['mail_recipients'][0])
&& $workorder['mail_recipients'][0] ? implode(';',
$workorder['mail_recipients']) : $to_email;
$email_data['use_yui_table'] = false;
@@ -1868,6 +1884,21 @@
$common_data =
$this->common_data($workorder_id);
$project =
$this->boproject->read_single($common_data['workorder']['project_id'],array(),true);
+ if(isset($this->config->config_data['invoice_acl']) &&
$this->config->config_data['invoice_acl'] == 'dimb')
+ {
+ $approve_role =
execMethod('property.boinvoice.check_role', $project['ecodimb'] ?
$project['ecodimb'] : $common_data['workorder']['ecodimb']);
+ if(!$approve_role['is_supervisor'] && !
$approve_role['is_budget_responsible'] && !$workorder['approved'])
+ {
+ phpgwapi_cache::message_set( lang('you
are not approved for this dimb: %1', $project['ecodimb'] ? $project['ecodimb']
: $workorder['ecodimb'] ), 'error' );
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiwo_hour.view', 'workorder_id'=> $workorder_id, 'from' =>
phpgw::get_var('from')));
+ }
+ if(!$workorder['approved'])
+ {
+ phpgwapi_cache::message_set(
lang('order is not approved'), 'error' );
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uiwo_hour.view', 'workorder_id'=> $workorder_id, 'from' =>
phpgw::get_var('from')));
+ }
+ }
+
$content =
$this->_get_order_details($common_data['content'], $show_cost);
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -27,8 +27,16 @@
* @version $Id$
*/
+ /**
+ * Import the YUI class
+ */
phpgw::import_class('phpgwapi.yui');
+ /**
+ * Import the jQuery class
+ */
+ phpgw::import_class('phpgwapi.jquery');
+
/**
* Description
* @package property
@@ -840,6 +848,14 @@
function edit($mode = 'edit')
{
+ if( $GLOBALS['phpgw_info']['flags']['nonavbar'] =
phpgw::get_var('nonavbar', 'bool'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noheader_xsl']
= true;
+ $GLOBALS['phpgw_info']['flags']['nofooter']
= true;
+ }
+
+ $_lean = phpgw::get_var('lean', 'bool');
+
$id = phpgw::get_var('id'); // in case of bigint
$selected_tab = phpgw::get_var('tab', 'string',
'REQUEST', 'general');
@@ -882,11 +898,11 @@
$project_id =
phpgw::get_var('project_id', 'int');
$values
= phpgw::get_var('values');
$values['ecodimb'] =
phpgw::get_var('ecodimb');
- $values['vendor_id'] =
phpgw::get_var('vendor_id', 'int', 'POST');
- $values['vendor_name'] =
phpgw::get_var('vendor_name', 'string', 'POST');
- $values['b_account_id'] =
phpgw::get_var('b_account_id', 'int', 'POST');
- $values['b_account_name'] =
phpgw::get_var('b_account_name', 'string', 'POST');
- $values['event_id'] =
phpgw::get_var('event_id', 'int', 'POST');
+ $values['vendor_id'] =
phpgw::get_var('vendor_id', 'int');
+ $values['vendor_name'] =
phpgw::get_var('vendor_name', 'string');
+ $values['b_account_id'] =
phpgw::get_var('b_account_id', 'int');
+ $values['b_account_name'] =
phpgw::get_var('b_account_name', 'string');
+ $values['event_id'] =
phpgw::get_var('event_id', 'int');
$origin
= phpgw::get_var('origin');
$origin_id
= phpgw::get_var('origin_id', 'int');
@@ -938,6 +954,14 @@
}
}
+ if($project_id && !isset($values['project_id']))
+ {
+ $values['project_id']=$project_id;
+ }
+
+ $project =
(isset($values['project_id'])?$boproject->read_single_mini($values['project_id']):'');
+
+
if (isset($values['save']))
{
if($GLOBALS['phpgw']->session->is_repost())
@@ -945,6 +969,25 @@
$receipt['error'][]=array('msg'=>lang('Hmm... looks like a repost!'));
}
+ if(isset($config->config_data['invoice_acl'])
&& $config->config_data['invoice_acl'] == 'dimb')
+ {
+ $approve_role =
execMethod('property.boinvoice.check_role', $project['ecodimb'] ?
$project['ecodimb'] : $values['ecodimb']);
+ if(!$approve_role['is_janitor'] &&
!$approve_role['is_supervisor'] && ! $approve_role['is_budget_responsible'])
+ {
+
$receipt['error'][]=array('msg'=>lang('you are not approved for this dimb: %1',
$project['ecodimb'] ? $project['ecodimb'] : $values['ecodimb'] ));
+ $error_id=true;
+ }
+
+ if(isset($values['approved']) &&
$values['approved'] && (!isset($values['approved_orig']) || !
$values['approved_orig']))
+ {
+
if(!$approve_role['is_supervisor'] && ! $approve_role['is_budget_responsible'])
+ {
+
$receipt['error'][]=array('msg'=>lang('you do not have permission to approve
this order') );
+ $error_id=true;
+ }
+ }
+ }
+
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record','property');
if(isset($insert_record_entity) &&
is_array($insert_record_entity))
{
@@ -1194,14 +1237,31 @@
}
}
}
- }
- if($project_id && !isset($values['project_id']))
- {
- $values['project_id']=$project_id;
+ if( phpgw::get_var('phpgw_return_as') == 'json'
)
+ {
+
+ if(!$receipt['error'])
+ {
+ $result = array
+ (
+ 'status' =>
'updated'
+ );
+ }
+ else
+ {
+ $result = array
+ (
+ 'status' =>
'error'
+ );
+ }
+ $result['receipt'] = $receipt;
+
+ return $result;
+ }
+
}
- $project =
(isset($values['project_id'])?$boproject->read_single_mini($values['project_id']):'');
if(!isset($receipt['error']))
{
@@ -1583,8 +1643,13 @@
);
- $_formatter_voucher_link =
isset($config->config_data['invoicehandler']) &&
$config->config_data['invoicehandler'] == 2 ?
'YAHOO.widget.DataTable.formatLink_invoicehandler_2' :
'YAHOO.widget.DataTable.formatLink';
+ $_formatter_voucher_link =
isset($config->config_data['invoicehandler']) &&
$config->config_data['invoicehandler'] == 2 ?
'YAHOO.widget.DataTable.formatLink_invoicehandler_2' :
'YAHOO.widget.DataTable.formatLink';
+ if($_lean)
+ {
+ $_formatter_voucher_link = '""';
+ }
+
$myColumnDefs[2] = array
(
'name' => "2",
@@ -1858,7 +1923,8 @@
'edit_action'
=>
$GLOBALS['phpgw']->link('/index.php',array('menuaction' =>
'property.uiworkorder.edit', 'id' => $id)),
'lang_edit_statustext'
=> lang('Edit this entry '),
'lang_edit'
=> lang('Edit'),
- 'value_extra_mail_address'
=> $value_extra_mail_address
+ 'value_extra_mail_address'
=> $value_extra_mail_address,
+ 'lean'
=> $_lean ? 1 : 0
);
$appname
= lang('Workorder');
@@ -1881,6 +1947,7 @@
// phpgwapi_yui::load_widget('button');
+ phpgwapi_jquery::load_widget('core');
$GLOBALS['phpgw']->css->validate_file('datatable');
$GLOBALS['phpgw']->css->validate_file('property');
@@ -1890,7 +1957,7 @@
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
$GLOBALS['phpgw']->js->validate_file( 'yahoo',
'workorder.edit', 'property' );
- // $GLOBALS['phpgw']->xslttpl->pp();
+ $GLOBALS['phpgw']->js->validate_file( 'portico',
'ajax_workorder_edit', 'property' );
}
function add()
Modified: branches/Version-1_0-branch/property/inc/export/default/Basware_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Basware_X114
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114
2012-05-02 08:17:55 UTC (rev 9254)
@@ -106,11 +106,24 @@
$sql= "SELECT DISTINCT fm_ecobilag.bilagsnr
FROM fm_ecobilag {$this->join} fm_ecobilag_sum_view ON fm_ecobilag.bilagsnr =
fm_ecobilag_sum_view.bilagsnr WHERE approved_amount = '0.00' OR (
budsjettsigndato IS NOT NULL AND (saksigndato IS NOT NULL OR oppsynsigndato IS
NOT NULL) AND utbetalingsigndato IS NOT NULL ) ORDER BY bilagsnr ASC";
}
$this->db->query($sql,__LINE__,__FILE__);
- $vouchers = array();
+ $vouchers_step1 = array();
while ($this->db->next_record())
{
- $vouchers[] = $this->db->f('bilagsnr');
+ $vouchers_step1[] =
$this->db->f('bilagsnr');
}
+
+ //Filter out partially approved
+ $vouchers = array();
+ foreach($vouchers_step1 as $bilagsnr)
+ {
+ $sql = "SELECT bilagsnr FROM fm_ecobilag WHERE
bilagsnr = {$bilagsnr} AND budsjettsigndato IS NULL";
+ $this->db->query($sql,__LINE__,__FILE__);
+ if( !$this->db->next_record() )
+ {
+ $vouchers[] = $bilagsnr;
+ }
+ }
+
return $vouchers;
}
@@ -285,7 +298,7 @@
'budsjettansvarligid' =>
$this->db->f('budsjettansvarligid'),
'oppsynsigndato' =>
$this->db->f('oppsynsigndato'),
'saksigndato' =>
$this->db->f('saksigndato'),
- 'budsjettsigndato' =>
$this->db->f('budsjettsigndato'),
+ // 'budsjettsigndato' =>
$this->db->f('budsjettsigndato'), // må anvises på nytt etter tilbakerulling
'merknad'
=> $this->db->f('merknad',true),
'line_text'
=> $this->db->f('line_text',true),
'splitt'
=> $this->db->f('splitt'),
Modified: branches/Version-1_0-branch/property/js/portico/ajax_invoice.js
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_invoice.js
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/js/portico/ajax_invoice.js
2012-05-02 08:17:55 UTC (rev 9254)
@@ -377,7 +377,10 @@
{
var oArgs_order =
{menuaction:'property.uiinvoice.view_order', order_id: voucher[0].order_id};
var requestUrl_order =
phpGWLink('index.php', oArgs_order);
- var htmlString_order = " <a target=
\"_blank\" href=\"" + requestUrl_order + "\" title=\"" + voucher[0].status +
"\" > Bestilling</a>";
+// var htmlString_order = " <a target=
\"_blank\" href=\"" + requestUrl_order + "\" title=\"" + voucher[0].status +
"\" > Bestilling</a>";
+
+ var htmlString_order = " <a
href=\"javascript:load_order(" + voucher[0].order_id + ");\" title=\"" +
voucher[0].status + "\" > Bestilling</a>";
+
$("#order_text").html( htmlString_order
);
}
else
@@ -651,3 +654,49 @@
}
});
}
+
+//------------
+
+function load_order( id ){
+ var oArgs = {menuaction: 'property.uiinvoice.view_order', order_id: id,
nonavbar: true, lean: true};
+ var requestUrl = phpGWLink('index.php', oArgs);
+
+ TINY.box.show({iframe:requestUrl,
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
mask:true, animate:true, close: true,closejs:function(){closeJS_local()}});
+// $("#curtain").show();
+// $("#popupBox").fadeIn("slow");
+// var htmlString = "";
+// htmlString += "<iframe width=\"100%\" height=\"100%\" src = \"" +
requestUrl + "\" ><p>Your browser does not support iframes.</p></iframe>";
+// $("#popupBox").html( htmlString );
+}
+
+function closeJS_local()
+{
+ var line_id = $("#line_id").val( );
+ var voucher_id_orig = $("#voucher_id").val();
+ $("#curtain").hide();
+ $("#popupBox").hide();
+ update_form_values(line_id, voucher_id_orig)
+}
+
+function closeJS_remote()
+{
+ TINY.box.hide();
+/*
+ var line_id = $("#line_id").val( );
+ var voucher_id_orig = $("#voucher_id").val();
+ $("#curtain").hide();
+ $("#popupBox").hide();
+ update_form_values(line_id, voucher_id_orig)
+*/
+}
+
+function hide_popupBox( ){
+ var line_id = $("#line_id").val( );
+ var voucher_id_orig = $("#voucher_id").val();
+ $("#curtain").hide();
+ $("#popupBox").hide();
+ update_form_values(line_id, voucher_id_orig);
+}
+
+
+
Copied: branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js
(from rev 9253, trunk/property/js/portico/ajax_workorder_edit.js)
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js
(rev 0)
+++ branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js
2012-05-02 08:17:55 UTC (rev 9254)
@@ -0,0 +1,89 @@
+$(document).ready(function(){
+
+ $("#workorder_edit").live("submit", function(e){
+
+ if($("#lean").val() == 0)
+ {
+ return;
+ }
+
+ e.preventDefault();
+ var thisForm = $(this);
+ var submitBnt = $(thisForm).find("input[type='submit']");
+ var requestUrl = $(thisForm).attr("action");
+ $.ajax({
+ type: 'POST',
+ url: requestUrl + "&phpgw_return_as=json&" +
$(thisForm).serialize(),
+ success: function(data) {
+ if(data)
+ {
+ if(data.sessionExpired)
+ {
+ alert('Sesjonen er utløpt - du
må logge inn på nytt');
+ return;
+ }
+
+ var obj = data;
+
+ var submitBnt =
$(thisForm).find("input[type='submit']");
+ if(obj.status == "updated")
+ {
+ $(submitBnt).val("Lagret");
+ }
+ else
+ {
+ $(submitBnt).val("Feil ved lagring");
+ }
+
+ // Changes text on save button back to original
+ window.setTimeout(function() {
+ $(submitBnt).val('Lagre');
+
$(submitBnt).addClass("not_active");
+ }, 1000);
+
+ var ok = true;
+ var htmlString = "";
+ if(data['receipt'] != null)
+ {
+ if(data['receipt']['error'] !=
null)
+ {
+ ok = false;
+ for ( var i = 0; i <
data['receipt']['error'].length; ++i )
+ {
+ htmlString +=
"<div class=\"error\">";
+ htmlString +=
data['receipt']['error'][i]['msg'];
+ htmlString +=
'</div>';
+ }
+
+ }
+
if(typeof(data['receipt']['message']) != 'undefined')
+ {
+ for ( var i = 0; i <
data['receipt']['message'].length; ++i )
+ {
+ htmlString +=
"<div class=\"msg_good\">";
+ htmlString +=
data['receipt']['message'][i]['msg'];
+ htmlString +=
'</div>';
+ }
+
+ }
+ $("#receipt").html(htmlString);
+ }
+
+ if(ok)
+ {
+ parent.closeJS_remote();
+ // parent.hide_popupBox();
+ }
+ }
+ }
+ });
+ });
+
+ $("#workorder_cancel").live("submit", function(e){
+ e.preventDefault();
+ parent.closeJS_remote();
+// parent.hide_popupBox();
+ });
+
+});
+
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2012-05-02
06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2012-05-02
08:17:55 UTC (rev 9254)
@@ -519,8 +519,10 @@
dim b property no Kostnadssted
dimb property no Kostnadssted
dimb roles property no Roller kostnadssted
+dimb role user property no Bruker/Rolle/Kostnadssted
no authorities demands property no Ingen myndighetskrav
no dimb property no K Ikke valgt
+Please select dimb! property no Angi kostnadssted
dim d property no Dim D
dime property no Kategori
directory created property no katalog er opprettet
@@ -1149,6 +1151,7 @@
order property no Bestilling
order approval revoked property no Bestillingsgodkjenning opphevet
order approved property no Bestilling godkjent
+order is not approved property no Bestilling er ikke godkjent
order_dim1 property no Aktivitet
order id property no BestillingsNr
order_id property no BestillingsNr
@@ -1899,6 +1902,7 @@
year property no År
yearly property no Årlig
you are not approved for this task property no Du mangler
rettigheter for denne oppgaven
+you are not approved for this dimb: %1 property no Du mangler
rettigheter for dette kostnadsstedet: %1
you have entered an invalid end date ! property no Du har angitt
en ugyldig slutt dato
you have entered an invalid start date ! property no Du har
angitt en ugyldig start dato
you have no edit right for this project property no Du har
ikke editeringsrettigheter for dette prosjektet
Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php 2012-05-02
06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php 2012-05-02
08:17:55 UTC (rev 9254)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.642';
+ $setup_info['property']['version'] = '0.9.17.643';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
@@ -142,6 +142,8 @@
'fm_ecobilagoverf',
'fm_ecobilag_category',
'fm_ecodimb',
+ 'fm_ecodimb_role',
+ 'fm_ecodimb_role_user',
'fm_ecodimd',
'fm_ecologg',
'fm_ecomva',
Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -1065,7 +1065,7 @@
'budsjettsigndato' => array('type' =>
'timestamp','nullable' => True),
'utbetalingsigndato' => array('type' =>
'timestamp','nullable' => True),
'merknad' => array('type' => 'text','nullable'
=> True),
- 'splitt' => array('type' => 'int','precision'
=> '2','nullable' => True),
+ 'splitt' => array('type' => 'int','precision'
=> '4','nullable' => True),
'kreditnota' => array('type' =>
'int','precision' => '2','nullable' => True),
'pre_transfer' => array('type' =>
'int','precision' => '2','nullable' => True),
'item_type' => array('type' =>
'int','precision' => '4','nullable' => True),
@@ -1121,7 +1121,7 @@
'overftid' => array('type' =>
'timestamp','nullable' => True),
'ordrebelop' => array('type' =>
'decimal','precision' => '20','scale' => '2','default' => '0','nullable' =>
False),
'merknad' => array('type' => 'text','nullable'
=> True),
- 'splitt' => array('type' => 'int','precision'
=> '2','nullable' => True),
+ 'splitt' => array('type' => 'int','precision'
=> '4','nullable' => True),
'filnavn' => array('type' =>
'varchar','precision' => '255','nullable' => False),
'kreditnota' => array('type' =>
'int','precision' => '2','nullable' => True),
'item_type' => array('type' =>
'int','precision' => '4','nullable' => True),
@@ -1171,6 +1171,35 @@
'fk' => array(),
'uc' => array()
),
+ 'fm_ecodimd_role' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
+ 'name' => array('type' => 'varchar','precision'
=> '25','nullable' => False)
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'fk' => array(),
+ 'uc' => array()
+ ),
+ 'fm_ecodimb_role_user' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto','precision' =>
'4','nullable' => False),
+ 'ecodimb' => array('type' => 'int','precision'
=> '2','nullable' => False),
+ 'user_id' => array('type' => 'int','precision'
=> '4','nullable' => False),
+ 'role_id' => array('type' => 'int','precision'
=> '4','nullable' => False),
+ 'default' => array('type' => 'int','precision'
=> '2','nullable' => true),
+ 'active_from' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'active_to' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'created_on' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'created_by' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'expired_on' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'expired_by' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'fk' => array('fm_ecodimd_role' => array('role_id' =>
'id'),'fm_ecodimd' => array('ecodimd' => 'id'),'phpgw_accounts' =>
array('user_id'=>'account_id')),
+ 'uc' => array()
+ ),
'fm_ecodimd' => array(
'fd' => array(
'id' => array('type' => 'varchar','precision'
=> '5','nullable' => False),
Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php
2012-05-02 08:17:55 UTC (rev 9254)
@@ -6244,3 +6244,84 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ $test[] = '0.9.17.642';
+ function property_upgrade0_9_17_642()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_ecobilag','splitt',
array('type' => 'int','precision' => '4','nullable' => True));
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_ecobilagoverf','splitt',
array('type' => 'int','precision' => '4','nullable' => True));
+
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'fm_ecodimb_role', array(
+ 'fd' => array(
+ 'id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'name' => array('type' =>
'varchar','precision' => '25','nullable' => False)
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'fk' => array(),
+ 'uc' => array()
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_ecodimb_role (id, name) VALUES (1, 'Bestiller')",__LINE__,__FILE__);
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_ecodimb_role (id, name) VALUES (2, 'Attestant')",__LINE__,__FILE__);
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_ecodimb_role (id, name) VALUES (3, 'Anviser')",__LINE__,__FILE__);
+
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'fm_ecodimb_role_user', array(
+ 'fd' => array(
+ 'id' => array('type' =>
'auto','precision' => '4','nullable' => False),
+ 'ecodimb' => array('type' =>
'int','precision' => '2','nullable' => False),
+ 'user_id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'role_id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'default_user' => array('type' =>
'int','precision' => '2','nullable' => true),
+ 'active_from' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'active_to' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'created_on' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'created_by' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'expired_on' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ 'expired_by' => array('type' => 'int',
'precision' => 4,'nullable' => True),
+ ),
+ 'pk' => array('id'),
+ 'ix' => array(),
+ 'fk' => array('fm_ecodimb_role' =>
array('role_id' => 'id'),'fm_ecodimb' => array('ecodimb' =>
'id'),'phpgw_accounts' => array('user_id'=>'account_id')),
+ 'uc' => array()
+ )
+ );
+
+ $sql = 'SELECT * FROM fm_responsibility_contact JOIN
phpgw_accounts ON fm_responsibility_contact.contact_id =
phpgw_accounts.person_id WHERE expired_on IS NULL AND ecodimb IS NOT NULL';
+ $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+
+ $roles = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $roles[] = array
+ (
+ 'ecodimb' =>
$GLOBALS['phpgw_setup']->oProc->f('ecodimb'),
+ 'user_id' =>
$GLOBALS['phpgw_setup']->oProc->f('account_id'),
+ 'role_id' =>
$GLOBALS['phpgw_setup']->oProc->f('responsibility_id') == 2 ? 3 : 2,
+ 'default_user' =>
$GLOBALS['phpgw_setup']->oProc->f('responsibility_id') == 2 ? 1 : '',
+ 'active_from' =>
$GLOBALS['phpgw_setup']->oProc->f('active_from'),
+ 'active_to' =>
$GLOBALS['phpgw_setup']->oProc->f('active_to'),
+ 'created_on' =>
$GLOBALS['phpgw_setup']->oProc->f('created_on'),
+ 'created_by' =>
$GLOBALS['phpgw_setup']->oProc->f('created_by')
+ );
+ $i++;
+ }
+
+ foreach ($roles as $role)
+ {
+ $cols = implode(',', array_keys($role));
+ $values =
$GLOBALS['phpgw_setup']->oProc->validate_insert(array_values($role));
+ $sql = "INSERT INTO fm_ecodimb_role_user ({$cols})
VALUES ({$values})";
+
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.643';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: branches/Version-1_0-branch/property/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/config.tpl
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/templates/base/config.tpl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -87,6 +87,15 @@
</select>
</td>
</tr>
+ <tr class="row_on">
+ <td>{lang_invoice_acl}:</td>
+ <td>
+ <select name="newsettings[invoice_acl]">
+ <option value="default"
{selected_invoice_acl_default}>ACL</option>
+ <option value="dimb"
{selected_invoice_acl_dimb}>DimB</option>
+ </select>
+ </td>
+ </tr>
<tr class="row_off">
<td>{lang_workorder_status_that_are_to_be_set_when_invoice_is_processed}:</td>
<td>
Modified: branches/Version-1_0-branch/property/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/property/templates/base/css/base.css
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/templates/base/css/base.css
2012-05-02 08:17:55 UTC (rev 9254)
@@ -73,40 +73,65 @@
font-weight: bold;
text-align: center;
}
-.yui-dt .yui-dt-hidden
-{
- border-right:0px solid #ff0 !important;
-}
-.yui-tt .bd
-{
- background-color:#fffbeb !important;
- border-color:#D4C237 #A6982B #A6982B;
- border-width:0px !important;
- color:#000000 !important;
- left:0 !important;
- padding:0 !important;
- font-family: tahoma !important;
- font-size: 11px !important;
-}
-.tooltip-table
-{
- width:200px !important;
-}
-.tooltip
-{
- background-color:#0066cc !important;
- color:#FFFFFF !important;
- font-weight: bold !important;
- font-family: tahoma !important;
- font-size: 11px !important;
-}
-.nolink a
-{
- color:#FFFFFF !important;
- text-decoration: none !important;
-}
-.nolink a visited
-{
- color:#FFFFFF !important;
- text-decoration: none !important;
-}
\ No newline at end of file
+.yui-dt .yui-dt-hidden
+{
+ border-right:0px solid #ff0 !important;
+}
+.yui-tt .bd
+{
+ background-color:#fffbeb !important;
+ border-color:#D4C237 #A6982B #A6982B;
+ border-width:0px !important;
+ color:#000000 !important;
+ left:0 !important;
+ padding:0 !important;
+ font-family: tahoma !important;
+ font-size: 11px !important;
+}
+.tooltip-table
+{
+ width:200px !important;
+}
+.tooltip
+{
+ background-color:#0066cc !important;
+ color:#FFFFFF !important;
+ font-weight: bold !important;
+ font-family: tahoma !important;
+ font-size: 11px !important;
+}
+.nolink a
+{
+ color:#FFFFFF !important;
+ text-decoration: none !important;
+}
+.nolink a visited
+{
+ color:#FFFFFF !important;
+ text-decoration: none !important;
+}
+
+#curtain {
+ background: none repeat scroll 0 0 #000000;
+ display: none;
+ height: 100%;
+ left: 0;
+ opacity: 0.5;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ z-index: 1;
+}
+
+#popupBox {
+ background: none repeat scroll 0 0 #fff;
+ display: none;
+ height: 50%;
+ left: 80px;
+ position: absolute;
+ top: 80px;
+ width: 800px;
+ z-index: 2;
+}
+
+
Modified: branches/Version-1_0-branch/property/templates/base/invoice2.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/invoice2.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/templates/base/invoice2.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -21,63 +21,36 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<style type="text/css">
-#box { width: 200px; height: 5px; background: blue; }
-//select { width: 200px; }
-#voucher_id_filter { width: 800px; }
-#dim_b { width: 200px; }
-#dim_e { width: 200px; }
-#period { width: 200px; }
-#periodization { width: 200px; }
-#periodization_start { width: 200px; }
-#process_code { width: 200px; }
-#tax_code { width: 200px; }
-#approve_as { width: 200px; }
-#_oppsynsmannid { width: 200px; }
-#_saksbehandlerid { width: 200px; }
-#_budsjettansvarligid { width: 200px; }
-.row_on,.th_bright
-{
- background-color: #CCEEFF;
-}
+ <style type="text/css">
+ #box { width: 200px; height: 5px; background: blue; }
+ //select { width: 200px; }
+ #voucher_id_filter { width: 800px; }
+ #dim_b { width: 200px; }
+ #dim_e { width: 200px; }
+ #period { width: 200px; }
+ #periodization { width: 200px; }
+ #periodization_start { width: 200px; }
+ #process_code { width: 200px; }
+ #tax_code { width: 200px; }
+ #approve_as { width: 200px; }
+ #_oppsynsmannid { width: 200px; }
+ #_saksbehandlerid { width: 200px; }
+ #_budsjettansvarligid { width: 200px; }
+ .row_on,.th_bright
+ {
+ background-color: #CCEEFF;
+ }
-.row_off
-{
- background-color: #DDF0FF;
-}
+ .row_off
+ {
+ background-color: #DDF0FF;
+ }
-</style>
+ </style>
-<xsl:call-template name="invoice" />
-
- <!-- DATATABLE DEFINITIONS-->
- <script type="text/javascript">
- var property_js = <xsl:value-of select="property_js"/>;
- var base_java_url = <xsl:value-of
select="base_java_url"/>;
- var datatable = new Array();
- var myColumnDefs = new Array();
- var myButtons = new Array();
- var td_count = <xsl:value-of select="td_count"/>;
-
- <xsl:for-each select="datatable">
- datatable[<xsl:value-of select="name"/>] = [
- {
- values:<xsl:value-of
select="values"/>,
- total_records: <xsl:value-of
select="total_records"/>,
- is_paginator: <xsl:value-of
select="is_paginator"/>,
- edit_action: <xsl:value-of
select="edit_action"/>,
- footer:<xsl:value-of
select="footer"/>
- }
- ]
- </xsl:for-each>
- <xsl:for-each select="myColumnDefs">
- myColumnDefs[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
- </xsl:for-each>
- <xsl:for-each select="myButtons">
- myButtons[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
- </xsl:for-each>
- </script>
-
+ <xsl:call-template name="invoice" />
+ <div id="popupBox"></div>
+ <div id="curtain"></div>
</xsl:template>
<xsl:template name="invoice" xmlns:php="http://php.net/xsl">
@@ -607,45 +580,36 @@
</xsl:template>
<xsl:template name="datasource-definition" xmlns:php="http://php.net/xsl">
-</xsl:template>
+ <!-- DATATABLE DEFINITIONS-->
+ <script type="text/javascript">
+ var property_js = <xsl:value-of
select="//property_js"/>;
+ var base_java_url = <xsl:value-of
select="//base_java_url"/>;
+ var datatable = new Array();
+ var myColumnDefs = new Array();
+ var myButtons = new Array();
+ var td_count = <xsl:value-of select="//td_count"/>;
-
-<xsl:template name="datasource-definition_old" xmlns:php="http://php.net/xsl">
- <script>
- YAHOO.namespace('portico');
-
- YAHOO.portico.columnDefs = [
- <xsl:for-each select="//datatable/field">
+ <xsl:for-each select="//datatable">
+ datatable[<xsl:value-of select="name"/>] = [
{
- key: "<xsl:value-of
select="key"/>",
- <xsl:if test="label">
- label: "<xsl:value-of
select="label"/>",
- </xsl:if>
- sortable: <xsl:value-of
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
- <xsl:if test="hidden">
- hidden: true,
- </xsl:if>
- <xsl:if test="formatter">
- formatter: <xsl:value-of
select="formatter"/>,
- </xsl:if>
- className: "<xsl:value-of
select="className"/>"
- }<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
- </xsl:for-each>
- ];
+ values:<xsl:value-of
select="values"/>,
+ total_records: <xsl:value-of
select="total_records"/>,
+ is_paginator: <xsl:value-of
select="is_paginator"/>,
+ edit_action: <xsl:value-of
select="edit_action"/>,
+ footer:<xsl:value-of
select="footer"/>
+ }
+ ]
+ </xsl:for-each>
+ <xsl:for-each select="//myColumnDefs">
+ myColumnDefs[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
+ </xsl:for-each>
+ <xsl:for-each select="//myButtons">
+ myButtons[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
+ </xsl:for-each>
+ </script>
- var main_source = '<xsl:value-of select="source"/>';
- var main_columnDefs = YAHOO.portico.columnDefs;
- var main_form = 'invoice_queryForm';
- var main_filters = ['voucher_id_filter', 'refresch_voucher_id'];
- var main_container = 'datatable-container';
- var main_table_id = 'datatable';
- var main_pag = 'data_paginator';
- var related_table = new Array('vouchers_table');
-
- setDataSource(main_source, main_columnDefs, main_form,
main_filters, main_container, main_pag, main_table_id, related_table );
-
- </script>
+
</xsl:template>
<!-- options for use with select-->
Modified: branches/Version-1_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/workorder.xsl
2012-05-02 06:26:45 UTC (rev 9253)
+++ branches/Version-1_0-branch/property/templates/base/workorder.xsl
2012-05-02 08:17:55 UTC (rev 9254)
@@ -87,8 +87,11 @@
</tr>
</xsl:when>
</xsl:choose>
+
+ <div id="receipt"></div>
+ <input type="hidden" id = "lean" name="lean"
value="{lean}"/>
<xsl:choose>
- <xsl:when test="value_workorder_id!='' and
mode='edit'">
+ <xsl:when test="value_workorder_id!='' and
mode='edit' and lean = 0">
<td>
<table>
<tr>
@@ -121,7 +124,7 @@
<xsl:variable name="form_action">
<xsl:value-of select="form_action"/>
</xsl:variable>
- <form ENCTYPE="multipart/form-data" method="post" name="form"
action="{$form_action}">
+ <form ENCTYPE="multipart/form-data" method="post"
id='workorder_edit' name="form" action="{$form_action}">
<div class="yui-navset" id="workorder_tabview">
<xsl:value-of disable-output-escaping="yes"
select="tabs"/>
<div class="yui-content">
@@ -134,10 +137,17 @@
<xsl:value-of select="lang_project_id"/>
</td>
<td>
-
<xsl:variable name="project_link"><xsl:value-of
select="project_link"/>&id=<xsl:value-of
select="value_project_id"/></xsl:variable>
-
<a href="{$project_link}">
-
<xsl:value-of select="value_project_id"/>
-
</a>
+
<xsl:choose>
+
<xsl:when test="lean = 0">
+
<xsl:variable name="project_link"><xsl:value-of
select="project_link"/>&id=<xsl:value-of
select="value_project_id"/></xsl:variable>
+
<a href="{$project_link}">
+
<xsl:value-of select="value_project_id"/>
+
</a>
+
</xsl:when>
+
<xsl:otherwise>
+
<xsl:value-of select="value_project_id"/>
+
</xsl:otherwise>
+
</xsl:choose>
<input type="hidden" name="values[project_id]"
value="{value_project_id}"/>
</td>
</tr>
@@ -378,6 +388,7 @@
<xsl:value-of select="php:function('lang', 'approved')"/>
</td>
<td>
+
<input type="hidden" name="values[approved_orig]"
value="{value_approved}"/>
<input type="checkbox" name="values[approved]" value="1">
<xsl:attribute name="title">
<xsl:value-of select="php:function('lang',
'approved')"/>
@@ -656,9 +667,8 @@
<table>
<tr>
<td>
-
<input type="hidden" id="notify_contact"
name="notify_contact" value="" title="{$lang_contact_statustext}">
-
</input>
-
<input type="hidden" name="notify_contact_name"
value="" onClick="notify_contact_lookup();" readonly="readonly"
title="{$lang_contact_statustext}"/>
+
<input type="hidden" id="notify_contact"
name="notify_contact" value=""/>
+
<input type="hidden" name="notify_contact_name"
value=""/>
</td>
</tr>
</table>
@@ -786,7 +796,8 @@
<xsl:variable
name="lang_save">
<xsl:value-of select="lang_save"/>
</xsl:variable>
- <input
type="submit" name="values[save]" value="{$lang_save}"
onMouseout="window.status='';return true;">
+ <input
type="hidden" name="values[save]" value="1"/>
+ <input
type="submit" name="save" value="{$lang_save}"
onMouseout="window.status='';return true;">
<xsl:attribute name="title">
<xsl:value-of select="lang_save_statustext"/>
</xsl:attribute>
@@ -806,7 +817,7 @@
<xsl:variable name="lang_done">
<xsl:value-of
select="lang_done"/>
</xsl:variable>
- <form method="post"
action="{$done_action}">
+ <form id="workorder_cancel"
method="post" action="{$done_action}">
<input type="submit"
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
<xsl:attribute
name="title">
<xsl:value-of
select="lang_done_statustext"/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9254] Merge 9220:9253 from trunk,
Sigurd Nes <=