[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13702] Merge 13602:13701 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13702] Merge 13602:13701 from trunk |
Date: |
Wed, 12 Aug 2015 09:25:23 +0000 |
Revision: 13702
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13702
Author: sigurdne
Date: 2015-08-12 09:25:22 +0000 (Wed, 12 Aug 2015)
Log Message:
-----------
Merge 13602:13701 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicomponent.inc.php
branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
branches/Version-1_0-branch/controller/setup/phpgw_no.lang
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
branches/Version-1_0-branch/controller/templates/base/config.tpl
branches/Version-1_0-branch/property/inc/class.boevent.inc.php
branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
branches/Version-1_0-branch/property/inc/class.boresponsible.inc.php
branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
branches/Version-1_0-branch/property/inc/class.soentity.inc.php
branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
branches/Version-1_0-branch/property/inc/class.solocation.inc.php
branches/Version-1_0-branch/property/inc/class.soresponsible.inc.php
branches/Version-1_0-branch/property/inc/class.uievent.inc.php
branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
branches/Version-1_0-branch/property/inc/class.uiresponsible.inc.php
branches/Version-1_0-branch/property/setup/default_records.inc.php
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/responsible.xsl
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune:12743-12875,12986
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874,11876-11879,11881-11891,11893,11895,11897-11899,11901,11903,11905-11906,11908-11917,11919,11921,11923-11925,11927-11931,11933-11954,11956-11962,11964-11969,11971-11973,11975-11976,11978,11980,11982,11984,11986-11991,11993,11995,11997-12000,12002,12004-12006,12008,12010-12011,12013,12015,12017-12018,12020-12021,12023,12025,12027-12028,12030,12032-12036,12038,12040-12042,12044-12045,12047,12049-12052,12054,12056-12063,12065-12073,12075-12086,12088-12092,12094-12095,12097,12099-12102,12104,12106-12107,12109-12182,12184-12201,12203-12210,12212-12231,12233-12239,12241-12248,12250-12328,12330-12363,12365-12384,12386-12397,12399-12401,12403-12434,12436-12455,12457,12459-12461,12463-12465,12467,12469-12477,12479-12518,12520-12527,12529-12532,12534-12595,12597-12601,12603-12655,12657-12670,12672-12683,12685-12686,12688-12707,12709-12730,12732-12750,12752-12755,12757,12759-12761,12763-12819,12821,12823,12825-12890,12892-12896,12898,12900-12913,12915-13060,13062-13142,13144,13146-13331,13333-13338,13340-13347,13349-13365,13367-13381,13383,13385,13387-13391,13393-13401,13403,13405-13416,13418-13431,13433-13434,13436,13438-13440,13442-13480,13482-13506,13509-13540,13545-13551,13553,13555-13564,13566-13570,13572,13574-13590,13601
+ /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874,11876-11879,11881-11891,11893,11895,11897-11899,11901,11903,11905-11906,11908-11917,11919,11921,11923-11925,11927-11931,11933-11954,11956-11962,11964-11969,11971-11973,11975-11976,11978,11980,11982,11984,11986-11991,11993,11995,11997-12000,12002,12004-12006,12008,12010-12011,12013,12015,12017-12018,12020-12021,12023,12025,12027-12028,12030,12032-12036,12038,12040-12042,12044-12045,12047,12049-12052,12054,12056-12063,12065-12073,12075-12086,12088-12092,12094-12095,12097,12099-12102,12104,12106-12107,12109-12182,12184-12201,12203-12210,12212-12231,12233-12239,12241-12248,12250-12328,12330-12363,12365-12384,12386-12397,12399-12401,12403-12434,12436-12455,12457,12459-12461,12463-12465,12467,12469-12477,12479-12518,12520-12527,12529-12532,12534-12595,12597-12601,12603-12655,12657-12670,12672-12683,12685-12686,12688-12707,12709-12730,12732-12750,12752-12755,12757,12759-12761,12763-12819,12821,12823,12825-12890,12892-12896,12898,12900-12913,12915-13060,13062-13142,13144,13146-13331,13333-13338,13340-13347,13349-13365,13367-13381,13383,13385,13387-13391,13393-13401,13403,13405-13416,13418-13431,13433-13434,13436,13438-13440,13442-13480,13482-13506,13509-13540,13545-13551,13553,13555-13564,13566-13570,13572,13574-13590,13601,13603-13701
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
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -820,15 +820,17 @@
function update($check_list)
{
$id = (int)$check_list->get_id();
-
+/*
$sql = "SELECT billable_hours FROM controller_check_list WHERE
controller_check_list.id = {$id}";
$this->db->query($sql);
$this->db->next_record();
$old_billable_hours = (float) $this->db->f('billable_hours');
+*/
+ $old_billable_hours = (float) $check_list->get_billable_hours();
- $billable_hours = $old_billable_hours +
$check_list->get_billable_hours();
+ $billable_hours = $old_billable_hours +
$check_list->get_delta_billable_hours();
//--------
$so_check_item = CreateObject('controller.socheck_item');
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
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -326,6 +326,11 @@
);
}
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
+
+ $required_actual_hours =
isset($config->config_data['required_actual_hours']) &&
$config->config_data['required_actual_hours'] ?
$config->config_data['required_actual_hours'] : false;
+
$data = array
(
'user_list' => array('options' =>
$user_list_options),
@@ -340,7 +345,10 @@
'building_location_code' =>
$building_location_code,
'location_level' => $level,
'check_list_type' => 'add_check_list',
- 'serie_id' => $serie_id
+ 'serie_id' => $serie_id,
+ 'required_actual_hours' =>
$required_actual_hours,
+ 'integration' =>
$this->_get_component_integration($location_id, $component_arr)
+
);
$GLOBALS['phpgw']->jqcal->add_listener('planned_date');
@@ -425,6 +433,11 @@
);
}
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
+
+ $required_actual_hours =
isset($config->config_data['required_actual_hours']) &&
$config->config_data['required_actual_hours'] ?
$config->config_data['required_actual_hours'] : false;
+
$data = array
(
'user_list' => array('options' =>
$user_list_options),
@@ -437,7 +450,9 @@
'current_year' => $year,
'current_month_nr' => $month,
'building_location_code' =>
$building_location_code,
- 'location_level' => $level
+ 'location_level' => $level,
+ 'required_actual_hours' =>
$required_actual_hours,
+ 'integration' =>
$this->_get_component_integration($location_id, $component_arr)
);
$GLOBALS['phpgw']->jqcal->add_listener('planned_date');
@@ -455,6 +470,136 @@
}
/**
+ * Get linked information from external systems - as pictures
+ * @param integer $location_id
+ * @param array $component_arr
+ * @return array integration info
+ */
+ private function _get_component_integration($location_id,
$_component_arr = array())
+ {
+ if(isset($_component_arr['id']) &&
$_component_arr['id'])
+ {
+ $component_id = $_component_arr['id'];
+ }
+ else
+ {
+ return array();
+ }
+ $attributes =
$GLOBALS['phpgw']->custom_fields->find2($location_id, 0, '',
'ASC','attrib_sort', $allrows = true);
+
+ $component_arr =
execMethod('property.soentity.read_single_eav', array('location_id' =>
$location_id, 'id' => $component_id, 'values' => array('attributes' =>
$attributes)));
+
+ $_custom_config =
CreateObject('admin.soconfig',$location_id);
+ $_config = isset($_custom_config->config_data) &&
$_custom_config->config_data ? $_custom_config->config_data : array();
+
+ $integration = array();
+ foreach ($_config as $_config_section =>
$_config_section_data)
+ {
+ if(isset($_config_section_data['tab']) &&
$component_arr['id'])
+ {
+ if(!isset($_config_section_data['url']))
+ {
+
phpgwapi_cache::message_set("'url' is a required setting for integrations,
'{$_config_section}' is disabled", 'error');
+ break;
+ }
+
+ //get session key from remote system
+ $arguments =
array($_config_section_data['auth_hash_name'] =>
$_config_section_data['auth_hash_value']);
+ $query = http_build_query($arguments);
+ $auth_url =
$_config_section_data['auth_url'];
+ $request = "{$auth_url}?{$query}";
+
+ $aContext = array
+ (
+ 'http' => array
+ (
+ 'request_fulluri' =>
true,
+ ),
+ );
+
+
if(isset($GLOBALS['phpgw_info']['server']['httpproxy_server']))
+ {
+ $aContext['http']['proxy'] =
"{$GLOBALS['phpgw_info']['server']['httpproxy_server']}:{$GLOBALS['phpgw_info']['server']['httpproxy_port']}";
+ }
+
+ $cxContext =
stream_context_create($aContext);
+ $response =
trim(file_get_contents($request, False, $cxContext));
+
+ $_config_section_data['url']
= htmlspecialchars_decode($_config_section_data['url']);
+ $_config_section_data['parametres']
= htmlspecialchars_decode($_config_section_data['parametres']);
+
+
parse_str($_config_section_data['parametres'], $output);
+
+ foreach ($output as $_dummy =>
$_substitute)
+ {
+ $_keys[] = $_substitute;
+
+ $__value = false;
+ if(!$__value =
urlencode($component_arr[str_replace(array('__','*'),array('',''),
$_substitute)]))
+ {
+ foreach
($component_arr['attributes'] as $_attribute)
+ {
+
if(str_replace(array('__','*'),array('',''), $_substitute) ==
$_attribute['name'])
+ {
+
$__value = urlencode($_attribute['value']);
+ break;
+ }
+ }
+ }
+
+ if($__value)
+ {
+ $_values[] = $__value;
+ }
+ }
+
+ unset($output);
+ unset($__value);
+ $_sep = '?';
+ if
(stripos($_config_section_data['url'],'?'))
+ {
+ $_sep = '&';
+ }
+ $_param = str_replace($_keys, $_values,
$_config_section_data['parametres']);
+ unset($_keys);
+ unset($_values);
+ $integration_src =
"{$_config_section_data['url']}{$_sep}{$_param}";
+ if($_config_section_data['action'])
+ {
+ $_sep = '?';
+ if
(stripos($integration_src,'?'))
+ {
+ $_sep = '&';
+ }
+ $integration_src .=
"{$_sep}{$_config_section_data['action']}=" .
$_config_section_data["action_{$mode}"];
+ }
+
+
if(isset($_config_section_data['location_data']) &&
$_config_section_data['location_data'])
+ {
+
$_config_section_data['location_data'] =
htmlspecialchars_decode($_config_section_data['location_data']);
+
parse_str($_config_section_data['location_data'], $output);
+ foreach ($output as $_dummy =>
$_substitute)
+ {
+ $_keys[] = $_substitute;
+ $_values[] =
urlencode($component_arr['location_data'][trim($_substitute, '_')]);
+ }
+ $integration_src .= '&' .
str_replace($_keys, $_values, $_config_section_data['location_data']);
+ }
+
+ $integration_src .=
"&{$_config_section_data['auth_key_name']}={$response}";
+
+ $integration[] = array
+ (
+ 'section' =>
$_config_section,
+ 'height' =>
isset($_config_section_data['height']) && $_config_section_data['height'] ?
$_config_section_data['height'] : 500,
+ 'src' =>
$integration_src
+ );
+ }
+ }
+ return $integration;
+ }
+
+ /**
* Public function for saving a check list
*
* @param HTTP:: location code, control id, status etc.. (check
list details)
@@ -482,6 +627,8 @@
$deadline_date_ts =
date_converter::date_to_timestamp($deadline_date);
+ $error = false;
+
if($planned_date != '')
{
$planned_date_ts =
date_converter::date_to_timestamp($planned_date);
@@ -520,6 +667,7 @@
$status =
controller_check_list::STATUS_NOT_DONE;
$completed_date_ts = 0;
$error_message = "Status kunne ikke
settes til utført - prøv igjen";
+ $error = true;
phpgwapi_cache::message_set($error_message, 'error');
}
@@ -539,17 +687,33 @@
}
}
- $check_list->set_status($status);
$check_list->set_comment($comment);
$check_list->set_deadline($deadline_date_ts);
$check_list->set_planned_date($planned_date_ts);
$check_list->set_completed_date($completed_date_ts);
$check_list->set_assigned_to($assigned_to);
- $check_list->set_billable_hours($billable_hours);
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
- if($check_list->validate())
+ $required_actual_hours =
isset($config->config_data['required_actual_hours']) &&
$config->config_data['required_actual_hours'] ?
$config->config_data['required_actual_hours'] : false;
+
+ if($status == controller_check_list::STATUS_DONE &&
$required_actual_hours && $check_list->get_billable_hours() == 0 &&
!$billable_hours)
{
+ phpgwapi_cache::message_set(lang("Please enter
billable hours"), 'error');
+ $error = true;
+ }
+ else
+ {
+
$check_list->set_delta_billable_hours($billable_hours);
+ }
+ if ( $status == controller_check_list::STATUS_DONE &&
$this->_check_for_required($check_list) && !$error)
+ {
+ $check_list->set_status($status);
+ }
+
+ if(!$error && $check_list->validate())
+ {
$check_list_id = $this->so->store($check_list);
if($check_list_id > 0)
@@ -569,7 +733,17 @@
}
else
{
- $this->add_check_list($check_list);
+ $this->redirect(array('menuaction' =>
'controller.uicheck_list.add_check_list',
+ 'control_id' =>
$control_id,
+ 'location_id' =>
$location_id,
+ 'component_id' =>
$component_id,
+ 'serie_id'
=> $serie_id,
+ 'deadline_ts' =>
$deadline_date_ts,
+ 'type'
=> $type,
+ 'assigned_to' =>
$assigned_to,
+ 'status'
=> $status,
+ // 'billable_hours' =>
$billable_hours
+ ));
}
}
}
@@ -893,21 +1067,33 @@
$check_list_id = phpgw::get_var('check_list_id');
$check_list_status = phpgw::get_var('status');
+ $check_list = $this->so->get_single($check_list_id);
- $check_list = $this->so->get_single($check_list_id);
- if ( !$this->_check_for_required($check_list) )
+//
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
+ $ok = true;
+
+ $required_actual_hours =
isset($config->config_data['required_actual_hours']) &&
$config->config_data['required_actual_hours'] ?
$config->config_data['required_actual_hours'] : false;
+ if($check_list_status ==
controller_check_list::STATUS_DONE && $required_actual_hours &&
$check_list->get_billable_hours() == 0)
{
+ phpgwapi_cache::message_set(lang("Please enter
billable hours"), 'error');
+ $ok = false;
+ }
+//
+ if ( !$this->_check_for_required($check_list) || !$ok)
+ {
$messages = phpgwapi_cache::message_get(true);
$message = '';
foreach($messages as $_type => $_message)
{
if($_type == 'error')
{
+ $i = 1;
foreach($_message as $__message)
{
- // $message.=
strip_tags($__message['msg']);
- $message.=
preg_replace("/<\/br[^>]*>\s*\r*\n*/is", "\n", $__message['msg']);
-
+ $message.= "#{$i}: " .
preg_replace("/<\/br[^>]*>\s*\r*\n*/is", "\n", $__message['msg']) . "\n";
+ $i++;
}
}
@@ -985,11 +1171,11 @@
foreach ($required_control_items as
$required_control_item)
{
- $_ok =
$this->so_case->get_cases_by_component($location_id, $component_id,
$required_control_item['id']);
+ $_ok =
$this->so_case->get_cases_by_component($location_id, $component_id,
$required_control_item['id'],$check_list->get_id());
if(!$_ok)
{
- $error_message = "mangler
registrering for required</br>";
- $error_message .=
"{$required_control_item['title']}</br>";
+ $error_message = lang('missing
value for required') . "</br>";
+ $error_message .=
"\"{$required_control_item['title']}\"</br>";
$error_message .=
execMethod('property.soentity.get_short_description', array('location_id' =>
$location_id, 'id' => $component_id));
$error_message .= "</br>";
phpgwapi_cache::message_set($error_message, 'error');
@@ -1058,6 +1244,17 @@
}
}
}
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
+
+ $required_actual_hours =
isset($config->config_data['required_actual_hours']) &&
$config->config_data['required_actual_hours'] ?
$config->config_data['required_actual_hours'] : false;
+
+ if($check_list->get_status ==
controller_check_list::STATUS_DONE && $required_actual_hours &&
$check_list->get_billable_hours() == 0)
+ {
+ phpgwapi_cache::message_set(lang("Please enter
billable hours"), 'error');
+ $ok = false;
+ }
+
return $ok;
}
}
Modified: branches/Version-1_0-branch/controller/inc/class.uicomponent.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicomponent.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/inc/class.uicomponent.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -610,6 +610,7 @@
// LOCATIONS: Process aggregated values
for controls with repeat type day or week
if($repeat_type <=
controller_control::REPEAT_TYPE_WEEK)
{
+ //FIX ME: Not currently
supported
// COMPONENTS: Process
aggregated values for controls with repeat type day or week
foreach($components_for_control_array as $component)
@@ -1056,4 +1057,35 @@
return
"{$repeat_type}<br/>{$link}<br/>{$assigned_to}<br/>{$time}";
}
+
+ function get_start_month_for_control($control)
+ {
+ // Checks if control starts in the year that is
displayed
+ if(date("Y", $control->get_start_date()) == $year)
+ {
+ $from_month = date("n",
$control->get_start_date());
+ }
+ else
+ {
+ $from_month = 1;
+ }
+
+ return $from_month;
+ }
+
+ function get_end_month_for_control($control)
+ {
+ // Checks if control ends in the year that is displayed
+ if(date("Y", $control->get_end_date()) == $year)
+ {
+ $to_month = date("n", $control->get_end_date());
+ }
+ else
+ {
+ $to_month = 12;
+ }
+
+ return $to_month;
+ }
+
}
\ No newline at end of file
Modified:
branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -56,6 +56,7 @@
protected $location_id;
protected $assigned_to;
protected $billable_hours;
+ protected $delta_billable_hours;
protected $control_area_id;
// Aggregate fields. Fields not in a table
@@ -78,6 +79,8 @@
public function __construct(int $id = null)
{
$this->id = (int)$id;
+ //intital status
+ $this->status = self::STATUS_NOT_DONE;
}
public function set_id($id)
@@ -268,11 +271,20 @@
{
$this->billable_hours = $billable_hours;
}
-
+
public function get_billable_hours()
{
return $this->billable_hours;
}
+ public function set_delta_billable_hours($delta_billable_hours)
+ {
+ $this->delta_billable_hours = $delta_billable_hours;
+ }
+
+ public function get_delta_billable_hours()
+ {
+ return (float)$this->delta_billable_hours;
+ }
public function serialize()
{
Modified: branches/Version-1_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/controller/setup/phpgw_no.lang 2015-08-11
23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/setup/phpgw_no.lang 2015-08-12
09:25:22 UTC (rev 13702)
@@ -1,3 +1,5 @@
+missing value for required controller no Mangler registrering
for obligatorisk
+Please enter billable hours controller no Angi egne timer
my assigned controls controller no Mine kontroller
add case controller no Registrer sak
add ticket controller no Registrer melding
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
2015-08-11 23:09:13 UTC (rev 13701)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
2015-08-12 09:25:22 UTC (rev 13702)
@@ -153,6 +153,19 @@
<xsl:apply-templates
select="user_list/options"/>
</select>
</div>
+ <xsl:if test="required_actual_hours = 1">
+ <div class="row">
+ <label>Egne Timer</label>
+ <input class="date">
+ <xsl:attribute
name="id">billable_hours</xsl:attribute>
+ <xsl:attribute
name="name">billable_hours</xsl:attribute>
+ <xsl:attribute
name="type">text</xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="check_list/billable_hours"/>
+ </div>
+ </xsl:if>
+
<!-- COMMENT -->
<div class="comment">
<label>Kommentar</label>
@@ -170,6 +183,13 @@
</div>
</form>
</div>
+ <xsl:for-each select="integration">
+ <div id="{section}">
+ <iframe id="{section}_content" width="100%"
height="{height}" src="{src}">
+ <p>Your browser does not support
iframes.</p>
+ </iframe>
+ </div>
+ </xsl:for-each>
</div>
</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
2015-08-11 23:09:13 UTC (rev 13701)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
2015-08-12 09:25:22 UTC (rev 13702)
@@ -93,17 +93,18 @@
<xsl:apply-templates
select="user_list/options"/>
</select>
</div>
- <div class="row">
- <label>Egne Timer</label>
- <input class="date">
- <xsl:attribute
name="id">billable_hours</xsl:attribute>
- <xsl:attribute
name="name">billable_hours</xsl:attribute>
- <xsl:attribute name="type">text</xsl:attribute>
- </input>
- <xsl:text> </xsl:text>
- <xsl:value-of
select="check_list/billable_hours"/>
- </div>
-
+ <xsl:if test="required_actual_hours = 1">
+ <div class="row">
+ <label>Egne Timer</label>
+ <input class="date">
+ <xsl:attribute
name="id">billable_hours</xsl:attribute>
+ <xsl:attribute
name="name">billable_hours</xsl:attribute>
+ <xsl:attribute
name="type">text</xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="check_list/billable_hours"/>
+ </div>
+ </xsl:if>
</fieldset>
<fieldset class="col_2">
<div class="row">
@@ -130,6 +131,13 @@
</div>
</form>
</div>
+ <xsl:for-each select="integration">
+ <div id="{section}">
+ <iframe id="{section}_content" width="100%"
height="{height}" src="{src}">
+ <p>Your browser does not support
iframes.</p>
+ </iframe>
+ </div>
+ </xsl:for-each>
</div>
</xsl:template>
Modified: branches/Version-1_0-branch/controller/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/config.tpl
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/controller/templates/base/config.tpl
2015-08-12 09:25:22 UTC (rev 13702)
@@ -23,18 +23,27 @@
</td>
</tr>
<tr class="row_off">
+ <td>{lang_required_actual_hours}.</td>
+ <td>
+ <select
name="newsettings[required_actual_hours]">
+ <option value=""
{selected_required_actual_hours_}>NO</option>
+ <option value="1"
{selected_required_actual_hours_1}>YES</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="row_on">
<td>Antall planlagte kontroller som skal vises.</td>
<td>
<input type="text"
name="newsettings[no_of_planned_controls]"
value="{value_no_of_planned_controls}"/>
</td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>Antall tildelte kontroller som skal vises</td>
<td>
<input type="text"
name="newsettings[no_of_assigned_controls]"
value="{value_no_of_assigned_controls}"/>
</td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_document_category}:</td>
<td>
<!--to be able to blank the setting - need an empty value-->
Modified: branches/Version-1_0-branch/property/inc/class.boevent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boevent.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.boevent.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -377,7 +377,7 @@
//$times['min']= '*'; // for testing the - every minute
- $account_id =
execMethod('property.soresponsible.get_responsible_user_id',
$data['responsible']);
+ $account_id =
execMethod('property.soresponsible.get_contact_user_id', $data['contact_id']);
$timer_data = array
(
@@ -387,7 +387,7 @@
'enabled' => !!
$data['enabled'],
// 'action' =>
$action['action'],
'action' =>
$this->event_functions[$data['action']]['action'],
- 'action_data' =>
array('responsible_id' => $data['responsible_id'])
+ 'action_data' => array('contact_id'
=> $data['contact_id'])
);
if($data['end_date'])
@@ -529,7 +529,6 @@
$values = $responsible->read_type(array('start' => 0,
'query' =>'', 'sort' => '',
'order' => '', 'location' => $location,
'allrows'=>true,
'filter' => ''));
-
$list = array(0 => lang('none'));
foreach($values as $entry)
{
@@ -563,15 +562,15 @@
$interlink = CreateObject('property.interlink');
$relation_link =
$interlink->get_relation_link(".{$location_arr[1]}", $id, 'view', true);
- $responsible_id =
isset($data['action_data']['responsible_id']) ?
$data['action_data']['responsible_id'] : 0;
- if(!$responsible_id)
+ $contact_id = isset($data['action_data']['contact_id'])
? $data['action_data']['contact_id'] : 0;
+ if(!$contact_id)
{
return false;
}
- $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$responsible_id);
+ $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$contact_id);
- $number = $comms[$responsible_id]['mobile (cell)
phone'];
+ $number = $comms[$contact_id]['mobile (cell) phone'];
$subject = lang('reminder');
$message = "<a href =\"{$relation_link}\">" .
lang('record').' #' .$id .'</a>'."\n";
@@ -595,17 +594,17 @@
$interlink = CreateObject('property.interlink');
$relation_link =
$interlink->get_relation_link(".{$location_arr[1]}", $id, 'view', true);
- $responsible_id =
isset($data['action_data']['responsible_id']) ?
$data['action_data']['responsible_id'] : 0;
- if(!$responsible_id)
+ $contact_id = isset($data['action_data']['contact_id'])
? $data['action_data']['contact_id'] : 0;
+ if(!$contact_id)
{
return false;
}
- $account_id =
$GLOBALS['phpgw']->accounts->search_person($responsible_id);
+ $account_id =
$GLOBALS['phpgw']->accounts->search_person($contact_id);
$socommon = CreateObject('property.socommon');
$prefs =
$socommon->create_preferences('property',$account_id);
- $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$responsible_id);
- $_address = isset($comms[$responsible_id]['work
email']) && $comms[$responsible_id]['work email'] ?
$comms[$responsible_id]['work email'] :$prefs['email'];
+ $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$contact_id);
+ $_address = isset($comms[$contact_id]['work
email']) && $comms[$contact_id]['work email'] ? $comms[$contact_id]['work
email'] :$prefs['email'];
$subject = lang('reminder');
$message = "<a href =\"{$relation_link}\">" .
lang('record').' #' .$id .'</a>'."\n";
Modified: branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -166,6 +166,13 @@
}
}
}
+ if
(isset($field['values_def']['get_single_value']) &&
$field['values_def']['get_single_value'])
+ {
+ foreach($values as &$entry)
+ {
+ $entry[$field['name']] =
execMethod($field['values_def']['get_single_value'],$entry[$field['name']]);
+ }
+ }
}
$this->total_records = $this->so->total_records;
Modified: branches/Version-1_0-branch/property/inc/class.boresponsible.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boresponsible.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.boresponsible.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -347,12 +347,12 @@
{
$to_edit[] = array
(
- 'id'
=> $responsible_item,
- 'active_from'
=> time(),
- 'contact_id'
=> $values['contact_id'],
- 'location_code'
=> $location_code,
-
'responsibility_id' => $values['responsibility_id'],
- 'remark'
=> 'from role assignment'
+ 'id'
=> $responsible_item,
+ 'active_from'
=> time(),
+ 'contact_id'
=> $values['contact_id'],
+ 'location_code'
=> $location_code,
+
'responsibility_role_id' => $values['responsibility_role_id'],
+ 'remark'
=> 'from role assignment'
);
}
}
@@ -370,7 +370,7 @@
$receipt['error'][] = array('msg'=>
lang('missing contact'));
}
- if(!$values['responsibility_id'])
+ if(!$values['responsibility_role_id'])
{
$receipt['error'][] = array('msg'=>
lang('Role is not related to responsibility'));
}
@@ -384,7 +384,7 @@
(
'location'
=> explode('-', $location_code),
'active_from' =>
time(),
- 'responsibility_id' =>
$values['responsibility_id'],
+ 'responsibility_role_id'
=> $values['responsibility_role_id'],
'contact_id' =>
$values['contact_id'],
'remark'
=> 'from role assignment'
);
Modified:
branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -208,19 +208,19 @@
$default_attrib['type'][]='V';
$default_attrib['precision'][] =4*$standard['id'];
$default_attrib['nullable'][] ='false';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][] ='location_code';
+ $default_attrib['statustext'][] ='location_code';
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
$j++;
$default_attrib['id'][]= $j;
- $default_attrib['column_name'][]= 'loc' .
$standard['id'] . '_name';
+ $default_attrib['column_name'][]=
"loc{$standard['id']}_name";
$default_attrib['type'][]='V';
$default_attrib['precision'][] =50;
$default_attrib['nullable'][] ='true';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][]
="loc{$standard['id']}_name";
+ $default_attrib['statustext'][]
="loc{$standard['id']}_name";
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
@@ -230,8 +230,8 @@
$default_attrib['type'][]='I';
$default_attrib['precision'][] =4;
$default_attrib['nullable'][] ='true';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][] ='entry_date';
+ $default_attrib['statustext'][] ='entry_date';
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
@@ -241,8 +241,8 @@
$default_attrib['type'][]='I';
$default_attrib['precision'][] =4;
$default_attrib['nullable'][] ='false';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][] ='category';
+ $default_attrib['statustext'][] ='category';
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
@@ -252,8 +252,8 @@
$default_attrib['type'][]='I';
$default_attrib['precision'][] =4;
$default_attrib['nullable'][] ='false';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][] ='user_id';
+ $default_attrib['statustext'][] ='user_id';
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
@@ -286,8 +286,8 @@
$default_attrib['type'][]='I';
$default_attrib['precision'][] =4;
$default_attrib['nullable'][] ='true';
- $default_attrib['input_text'][] ='dummy';
- $default_attrib['statustext'][] ='dummy';
+ $default_attrib['input_text'][] ='change_type';
+ $default_attrib['statustext'][] ='change_type';
$default_attrib['attrib_sort'][] ='';
$default_attrib['custom'][] ='';
@@ -342,12 +342,12 @@
$pk[$i-1]= 'loc' . $i;
$default_attrib['id'][]
= $i+$j;
- $default_attrib['column_name'][] = 'loc'
. $i;
+ $default_attrib['column_name'][] =
"loc{$i}";
$default_attrib['type'][]
= 'V';
$default_attrib['precision'][] = 4;
$default_attrib['nullable'][] =
'false';
- $default_attrib['input_text'][] =
'dummy';
- $default_attrib['statustext'][] =
'dummy';
+ $default_attrib['input_text'][] =
"loc{$i}";
+ $default_attrib['statustext'][] =
"loc{$i}";
$default_attrib['attrib_sort'][] = '';
$default_attrib['custom'][]
= '';
}
@@ -374,6 +374,8 @@
$fd['area_gross'] = array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00');
$fd['area_net'] = array('type' => 'decimal','precision'
=> '20','scale' => '2','nullable' => True,'default' => '0.00');
$fd['area_usable'] = array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00');
+ $fd['modified_by'] = array('type' => 'int','precision'
=> 4,'nullable' => true);
+ $fd['modified_on'] = array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp');
$ix = array('location_code');
$uc = array();
Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -1869,6 +1869,12 @@
function read_single_eav($data, $values = array())
{
+
+ if(!$values)
+ {
+ $values = isset($data['values']) &&
$data['values'] ? $data['values'] : array();
+ }
+
$sql = '';
if(isset($data['guid']) && $data['guid'])
Modified: branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -2264,7 +2264,6 @@
'valueset' => false,
'method' => 'preferences.boadmin_acl.get_locations',
'method_input' => array('acl_app' => 'property', 'selected' =>
'##location##')
-//
'method_input' => array('acl_app' => '$this->appname', 'selected' =>
'##location##', 'have_categories' => true)
)
),
array
@@ -2275,6 +2274,7 @@
'values_def'
=> array
(
'valueset' => false,
+
'get_single_value' => 'property.soresponsible.get_responsibility_name',
'method' => 'property.boresponsible.get_responsibilities',
'method_input' => array('appname' => '$this->appname', 'selected' =>
'##responsibility_id##')
)
Modified: branches/Version-1_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.solocation.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.solocation.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -554,10 +554,8 @@
{
$joinmethod .= " {$this->join}
fm_responsibility_contact ON ( fm_location{$type_id}.location_code =
fm_responsibility_contact.location_code))";
$paranthesis .='(';
- $joinmethod .= " {$this->join}
fm_responsibility ON ( fm_responsibility_contact.responsibility_id =
fm_responsibility.id))";
+ $joinmethod .= " {$this->join}
fm_responsibility_role ON ( fm_responsibility_contact.responsibility_role_id =
fm_responsibility_role.id))";
$paranthesis .='(';
- $joinmethod .= " {$this->join}
fm_responsibility_role ON ( fm_responsibility.id =
fm_responsibility_role.responsibility_id))";
- $paranthesis .='(';
$cols.= ',fm_responsibility_role.id as
role_id';
$cols_return[] = 'role_id';
@@ -1310,11 +1308,20 @@
}
}
- $cols =implode(",", $cols) . ",entry_date,user_id";
- $vals ="'" . implode("','", $vals) . "'," . "'" .
time() . "','" . $this->account . "'";
+ $cols[] = 'user_id';
+ $cols[] = 'entry_date';
+ $cols[] = 'modified_by';
+ $cols[] = 'modified_on';
+ $vals[] = $this->account;
+ $vals[] = time();
+ $vals[] = $this->account;
+ $vals[] = date($this->db->datetime_format(),time());
+ $cols = implode(",", $cols);
+ $vals = "'" . implode("','", $vals) . "'";
+
$this->db->transaction_begin();
- $sql = "INSERT INTO fm_location$type_id ($cols)
VALUES ($vals)";
+ $sql = "INSERT INTO fm_location{$type_id} ($cols)
VALUES ($vals)";
//echo $sql;
$this->db->query($sql,__LINE__,__FILE__);
@@ -1368,11 +1375,12 @@
}
}
- $value_set['entry_date'] = time();
+ $value_set['modified_by'] = $this->account;
+ $value_set['modified_on'] =
date($this->db->datetime_format(),time());
$value_set =
$this->db->validate_update($value_set);
- $sql = "SELECT * from fm_location$type_id where
location_code ='" . $location['location_code'] . "'";
+ $sql = "SELECT * FROM fm_location{$type_id} WHERE
location_code ='{$location['location_code']}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
@@ -1410,10 +1418,10 @@
$vals = $this->db->validate_insert($vals);
$this->db->transaction_begin();
- $sql = "INSERT INTO fm_location" . $type_id ."_history
($cols) VALUES ($vals)";
+ $sql = "INSERT INTO fm_location{$type_id}_history
($cols) VALUES ($vals)";
$this->db->query($sql,__LINE__,__FILE__);
- $sql = "UPDATE fm_location$type_id SET $value_set WHERE
location_code='" . $location['location_code'] . "'";
+ $sql = "UPDATE fm_location{$type_id} SET {$value_set}
WHERE location_code='{$location['location_code']}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->update_location_name($location['location_code']);
@@ -1808,15 +1816,15 @@
return;
}
- $table = 'fm_location' . $type_id . '_history';
+ $table = "fm_location{$type_id}_history";
- $table_category = 'fm_location' . $type_id .
'_category';
+ $table_category = "fm_location{$type_id}_category";
$location_id =
$GLOBALS['phpgw']->locations->get_id('property', ".location.{$type_id}");
$choice_table = 'phpgw_cust_choice';
$attribute_table = 'phpgw_cust_attribute';
- $attribute_filter = " location_id = {$location_id}";
+ $attribute_filter = "location_id = {$location_id}";
- $sql = "SELECT column_name,datatype,input_text,id as
attrib_id FROM $attribute_table WHERE $attribute_filter";
+ $sql = "SELECT column_name,datatype,input_text,id AS
attrib_id FROM {$attribute_table} WHERE {$attribute_filter}";
$this->db->query($sql,__LINE__,__FILE__);
while ($this->db->next_record())
@@ -1839,14 +1847,16 @@
$attrib[] = array
- (
- 'column_name' => 'exp_date',
- 'input_text' => 'exp date',
- 'datatype' => 'D',
- 'attrib_id' => 0
- );
+ (
+ 'column_name' => 'exp_date',
+ 'input_text' => 'exp date',
+ 'datatype' => 'D',
+ 'attrib_id' => 0
+ );
- $sql = "SELECT $table.*, $table_category.descr as
category FROM $table $this->left_join $table_category ON $table.category
=$table_category.id WHERE location_code='$location_code' ORDER BY exp_date
DESC";
+ $sql = "SELECT {$table}.*, {$table_category}.descr as
category"
+ . " FROM {$table} {$this->left_join} {$table_category}
ON {$table}.category = {$table_category}.id"
+ . " WHERE location_code='{$location_code}' ORDER BY
exp_date DESC";
$this->db->query($sql,__LINE__,__FILE__);
$j=0;
Modified: branches/Version-1_0-branch/property/inc/class.soresponsible.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soresponsible.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.soresponsible.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -86,29 +86,16 @@
if ($order)
{
- $ordermethod = " order by
fm_responsibility.$order $sort";
+ $ordermethod = " ORDER BY
fm_responsibility.$order $sort";
}
else
{
- $ordermethod = ' order by fm_responsibility.id
DESC';
+ $ordermethod = ' ORDER BY fm_responsibility.id
DESC';
}
$where= 'WHERE';
$filtermethod = '';
-/*
- if(is_array($filter) && $location)
- {
- $filtermethod .= " $where cat_id IN (" .
implode(',', $filter) . ')';
- $where = 'AND';
- }
-
- if($location)
- {
- $filtermethod .= " $where
fm_responsibility_module.location_id =" .
$GLOBALS['phpgw']->locations->get_id($this->appname, $location);
- $where = 'AND';
- }
- */
$querymethod = '';
if($query)
{
@@ -116,11 +103,7 @@
}
$sql = "SELECT fm_responsibility.* FROM
fm_responsibility"
-// . " {$this->join} fm_responsibility_module ON
fm_responsibility.id = fm_responsibility_module.responsibility_id"
-// . " {$this->join} phpgw_locations ON
fm_responsibility_module.location_id = phpgw_locations.location_id"
-// . " {$this->join} phpgw_applications ON
phpgw_locations.app_id = phpgw_applications.app_id"
. " {$filtermethod} {$querymethod}";
-// . " WHERE app_name = '{$appname}' $filtermethod
$querymethod";
$this->db->query($sql, __LINE__, __FILE__);
$this->total_records = $this->db->num_rows();
@@ -143,18 +126,13 @@
'id' =>
$this->db->f('id'),
'name' =>
$this->db->f('name', true),
'descr' =>
$this->db->f('descr', true),
- 'active' =>
$this->db->f('active'),
- 'location' =>
$this->db->f('location'),
- 'cat_id' =>
$this->db->f('cat_id'),
- 'created_by' =>
$this->db->f('created_by'),
- 'created_on' =>
$this->db->f('created_on'),
);
}
$cats = CreateObject('phpgwapi.categories', -1);
foreach($values as &$entry)
{
- $sql = "SELECT location_id, cat_id FROM
fm_responsibility_module WHERE responsibility_id = {$entry['id']}";
+ $sql = "SELECT * FROM fm_responsibility_module
WHERE responsibility_id = {$entry['id']}";
$this->db->query($sql, __LINE__, __FILE__);
$locations = array();
while ($this->db->next_record())
@@ -162,6 +140,10 @@
$location_id =
$this->db->f('location_id');
$cat_id = $this->db->f('cat_id');
$locations["{$location_id}_{$cat_id}"]
= true;
+ $entry['active'] =
$this->db->f('active');
+ $entry['created_by'] =
$this->db->f('created_by');
+ $entry['created_on'] =
$this->db->f('created_on');
+
}
$__location_info = array();
foreach($locations as $location => $dummy)
@@ -347,7 +329,6 @@
'id' =>
$this->db->f('id'),
'name' =>
$this->db->f('name', true),
'descr' =>
$this->db->f('descr', true),
- 'active' =>
$this->db->f('active'),
'cat_id' =>
$this->db->f('cat_id'),
'created_by' =>
$this->db->f('created_by'),
'created_on' =>
$this->db->f('created_on'),
@@ -366,7 +347,8 @@
public function read_single_role($id)
{
- $sql = 'SELECT * FROM fm_responsibility_role WHERE id=
' . (int) $id;
+ $id = (int) $id;
+ $sql = "SELECT * FROM fm_responsibility_role WHERE id=
{$id}";
$this->db->query($sql, __LINE__, __FILE__);
@@ -429,10 +411,10 @@
{
$receipt = array();
- $value_set['name']
=$this->db->db_addslashes($data['name']);
+ $value_set['name']
= $this->db->db_addslashes($data['name']);
$value_set['remark'] =
$this->db->db_addslashes($data['remark']);
$value_set['responsibility_id'] =
$data['responsibility_id'];
- $value_set['location_level']
= implode(',', $data['location_level']);
+ $value_set['location_level'] = implode(',',
$data['location_level']);
$value_set['modified_date'] =
time();
@@ -455,7 +437,31 @@
return $receipt;
}
+ /**
+ * get the responsibility name
+ *
+ * @param type $id
+ * @return string name
+ */
+ public function get_responsibility_name($id)
+ {
+ static $names = array();
+ $i = (int) $id;
+ if ($names[$i])
+ {
+ return $names[$i];
+ }
+
+
+ $sql = "SELECT * FROM fm_responsibility WHERE id=
{$id}";
+ $this->db->query($sql, __LINE__, __FILE__);
+ $this->db->next_record();
+ $name = $this->db->f('name', true);
+ $names[$i] = $name;
+ return $name;
+ }
+
/**
* Read single responsibility type
*
@@ -479,8 +485,6 @@
'id' =>
$this->db->f('id'),
'name' =>
$this->db->f('name', true),
'descr' =>
$this->db->f('descr', true),
- 'active' =>
$this->db->f('active'),
- 'cat_id' =>
$this->db->f('cat_id'),
'created_by' =>
$this->db->f('created_by'),
'created_on' =>
$this->db->f('created_on'),
);
@@ -514,10 +518,23 @@
function delete_type($id)
{
+ $id = (int)$id;
$this->db->transaction_begin();
- $this->db->query('DELETE FROM fm_responsibility_module
WHERE responsibility_id=' . (int) $id, __LINE__, __FILE__);
- $this->db->query('DELETE FROM fm_responsibility_contact
WHERE responsibility_id=' . (int) $id, __LINE__, __FILE__);
- $this->db->query('DELETE FROM fm_responsibility WHERE
id=' . (int) $id, __LINE__, __FILE__);
+
+ $this->db->query("SELECT id FROM fm_responsibility_role
WHERE responsibility_id = {$id}", __LINE__, __FILE__);
+
+ $responsibility_role_ids = array();
+ while ($this->db->next_record())
+ {
+ $responsibility_role_ids[] = $this->db->f('id');
+ }
+ if($responsibility_role_ids)
+ {
+ $this->db->query('DELETE FROM
fm_responsibility_contact WHERE responsibility_role_id IN(' . implode(',',
$responsibility_role_ids) . ')', __LINE__, __FILE__);
+ }
+ $this->db->query("DELETE FROM fm_responsibility_role
WHERE responsibility_id = {$id}", __LINE__, __FILE__);
+ $this->db->query("DELETE FROM fm_responsibility_module
WHERE responsibility_id = {$id}", __LINE__, __FILE__);
+ $this->db->query("DELETE FROM fm_responsibility WHERE
id = {$id}", __LINE__, __FILE__);
$this->db->transaction_commit();
}
@@ -540,31 +557,39 @@
$order = isset($data['order']) ?
$this->db->db_addslashes($data['order']) : '';
$allrows = isset($data['allrows']) ?
!!$data['allrows'] : '';
$type_id =
isset($data['type_id']) && $data['type_id'] ? (int) $data['type_id'] : 0;
+ $role_id =
isset($data['role_id']) && $data['role_id'] ? (int) $data['role_id'] : 0;
}
if ($order)
{
- $ordermethod = " order by $order $sort";
+ $ordermethod = "ORDER BY $order $sort";
}
else
{
- $ordermethod = ' order by responsibility_id
DESC';
+ $ordermethod = 'ORDER BY responsibility_role_id
DESC';
}
- $filtermethod = ' WHERE expired_on IS NULL';
+ $filtermethod = 'WHERE expired_on IS NULL';
$where = 'AND';
if($type_id > 0)
{
- $filtermethod .= " $where responsibility_id =
$type_id";
+ $filtermethod .= " {$where} responsibility_id =
{$type_id}";
}
+ if($role_id > 0)
+ {
+ $filtermethod .= " {$where}
responsibility_role_id = {$type_id}";
+ }
+
$querymethod = '';
if($query)
{
$querymethod = "$where (remark $this->like
'%$query%')";
}
- $sql = "SELECT * FROM fm_responsibility_contact
$filtermethod $querymethod";
+ $sql = "SELECT fm_responsibility_contact.* ,
fm_responsibility_role.responsibility_id FROM fm_responsibility_contact"
+ . " $this->join fm_responsibility_role ON
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
+ . " $filtermethod $querymethod";
$this->db->query($sql, __LINE__, __FILE__);
$this->total_records = $this->db->num_rows();
@@ -584,22 +609,22 @@
{
$values[] = array
(
- 'id'
=> $this->db->f('id'),
- 'responsibility_id' =>
$this->db->f('responsibility_id'),
- 'contact_id' =>
$this->db->f('contact_id'),
- 'location_code' =>
$this->db->f('location_code'),
- 'priority'
=> $this->db->f('priority'),
- 'active_from' =>
$this->db->f('active_from'),
- 'active_to'
=> $this->db->f('active_to'),
- 'created_on' =>
$this->db->f('created_on'),
- 'created_by' =>
$this->db->f('created_by'),
- 'expired_on' =>
$this->db->f('expired_on'), // historical records
- 'expired_by' =>
$this->db->f('expired_by'),
- 'p_num'
=> $this->db->f('p_num', true),
- 'p_entity_id' =>
$this->db->f('p_entity_id'),
- 'p_cat_id'
=> $this->db->f('p_cat_id'),
- 'ecodimb'
=> $this->db->f('ecodimb'),
- 'remark'
=> $this->db->f('remark', true),
+ 'id'
=> $this->db->f('id'),
+ 'responsibility_id'
=> $this->db->f('responsibility_id'),
+ 'responsibility_role_id'
=> $this->db->f('responsibility_role_id'),
+ 'contact_id'
=> $this->db->f('contact_id'),
+ 'location_code'
=> $this->db->f('location_code'),
+ 'priority'
=> $this->db->f('priority'),
+ 'active_from'
=> $this->db->f('active_from'),
+ 'active_to'
=> $this->db->f('active_to'),
+ 'created_on'
=> $this->db->f('created_on'),
+ 'created_by'
=> $this->db->f('created_by'),
+ 'expired_on'
=> $this->db->f('expired_on'), // historical records
+ 'expired_by'
=> $this->db->f('expired_by'),
+ 'p_num'
=> $this->db->f('p_num', true),
+ 'p_entity_id'
=> $this->db->f('p_entity_id'),
+ 'p_cat_id'
=> $this->db->f('p_cat_id'),
+ 'remark'
=> $this->db->f('remark', true),
);
}
@@ -622,7 +647,7 @@
$insert_values = array
(
- (int) $values['responsibility_id'],
+ (int) $values['responsibility_role_id'],
(int) $values['contact_id'],
@implode('-', $values['location']),
(int) $values['active_from'],
@@ -630,7 +655,6 @@
isset($values['extra']['p_num']) ?
$values['extra']['p_num'] : '',
isset($values['extra']['p_entity_id'])
? $values['extra']['p_entity_id'] : '',
isset($values['extra']['p_cat_id']) ?
$values['extra']['p_cat_id'] : '',
- $values['ecodimb'],
$values['remark'],
$this->account,
time()
@@ -640,8 +664,8 @@
$this->db->transaction_begin();
- $this->db->query("INSERT INTO fm_responsibility_contact
(responsibility_id, contact_id,"
- ." location_code, active_from, active_to,
p_num, p_entity_id, p_cat_id, ecodimb, remark, created_by, created_on)"
+ $this->db->query("INSERT INTO fm_responsibility_contact
(responsibility_role_id, contact_id,"
+ ." location_code, active_from, active_to,
p_num, p_entity_id, p_cat_id, remark, created_by, created_on)"
." VALUES ($insert_values)", __LINE__,
__FILE__);
if($this->db->transaction_commit())
@@ -676,8 +700,7 @@
|| $values['active_from'] !=
$orig['active_from']
|| $values['active_to'] != $orig['active_to']
|| $values['extra']['p_num'] != $orig['p_num']
- || $values['remark'] != $orig['remark']
- || $values['ecodimb'] != $orig['ecodimb'])
+ || $values['remark'] != $orig['remark'])
{
$receipt = $this->add_contact($values);
@@ -687,7 +710,6 @@
$value_set['expired_by'] =
$this->account;
$value_set['expired_on'] =
time();
- $value_set['ecodimb'] =
$values['ecodimb'];
}
$value_set =
$this->db->validate_update($value_set);
@@ -727,9 +749,10 @@
public function read_single_contact($id)
{
- $sql = "SELECT fm_responsibility_contact.*,
fm_responsibility.name as responsibility_name"
+ $sql = "SELECT fm_responsibility_contact.*,
fm_responsibility.id as responsibility_id, fm_responsibility.name AS
responsibility_name, fm_responsibility_role.name AS role_name"
. " FROM fm_responsibility_contact"
- . " {$this->join} fm_responsibility ON
fm_responsibility_contact.responsibility_id = fm_responsibility.id"
+ . " {$this->join} fm_responsibility_role ON
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
+ . " {$this->join} fm_responsibility ON
fm_responsibility_role.responsibility_id = fm_responsibility.id"
. ' WHERE fm_responsibility_contact.id=' .
(int) $id;
$this->db->query($sql, __LINE__, __FILE__);
@@ -739,23 +762,24 @@
$this->db->next_record();
$values = array
(
- 'id' =>
$this->db->f('id'),
- 'responsibility_id' =>
$this->db->f('responsibility_id'),
- 'responsibility_name'=>
$this->db->f('responsibility_name'),
- 'contact_id' =>
$this->db->f('contact_id'),
- 'location_code' =>
$this->db->f('location_code'),
- 'p_num' =>
$this->db->f('p_num'),
- 'p_entity_id' =>
$this->db->f('p_entity_id'),
- 'p_cat_id' =>
$this->db->f('p_cat_id'),
- 'remark' =>
$this->db->f('remark', true),
- 'active_from' =>
$this->db->f('active_from'),
- 'active_to' =>
$this->db->f('active_to'),
- 'created_by' =>
$this->db->f('created_by'),
- 'created_on' =>
$this->db->f('created_on'),
- 'expired_by' =>
$this->db->f('expired_by'),
- 'expired_on' =>
$this->db->f('expired_on'),
- 'priority' =>
$this->db->f('priority'), // FIXME - evaluate the need for this one
- 'ecodimb' =>
$this->db->f('ecodimb')
+ 'id'
=> $this->db->f('id'),
+ 'responsibility_id'
=> $this->db->f('responsibility_id'),
+ 'responsibility_role_id' =>
$this->db->f('responsibility_role_id'),
+ 'responsibility_name' =>
$this->db->f('responsibility_name'),
+ 'role_name'
=> $this->db->f('role_name'),
+ 'contact_id'
=> $this->db->f('contact_id'),
+ 'location_code'
=> $this->db->f('location_code'),
+ 'p_num'
=> $this->db->f('p_num'),
+ 'p_entity_id'
=> $this->db->f('p_entity_id'),
+ 'p_cat_id'
=> $this->db->f('p_cat_id'),
+ 'remark'
=> $this->db->f('remark', true),
+ 'active_from'
=> $this->db->f('active_from'),
+ 'active_to'
=> $this->db->f('active_to'),
+ 'created_by'
=> $this->db->f('created_by'),
+ 'created_on'
=> $this->db->f('created_on'),
+ 'expired_by'
=> $this->db->f('expired_by'),
+ 'expired_on'
=> $this->db->f('expired_on'),
+ 'priority'
=> $this->db->f('priority') // FIXME - evaluate the need for this one
);
return $values;
@@ -808,8 +832,7 @@
$time = time() +1;
$sql = "SELECT fm_responsibility_contact.id, contact_id
FROM fm_responsibility_contact"
- . " {$this->join} fm_responsibility ON
fm_responsibility_contact.responsibility_id = fm_responsibility.id"
- . " {$this->join} fm_responsibility_role ON
fm_responsibility.id = fm_responsibility_role.responsibility_id"
+ . " {$this->join} fm_responsibility_role ON
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
. " WHERE fm_responsibility_role.id ={$role_id}"
. " AND fm_responsibility_contact.location_code
='{$location_code}'"
. " AND active_from < {$time} AND (active_to >
{$time} OR active_to = 0) AND expired_on IS NULL";
@@ -844,14 +867,8 @@
$todo = false;
$item_filter = '';
- if(isset($data['ecodimb']) && $data['ecodimb'])
+ if(isset($data['extra']['p_entity_id']) &&
$data['extra']['p_entity_id'])
{
- $item_filter = " AND ecodimb =
'{$data['ecodimb']}'";
- $location_filter[] = '';
- $todo = true;
- }
- elseif(isset($data['extra']['p_entity_id']) &&
$data['extra']['p_entity_id'])
- {
$location_code = implode('-',
$data['location']);
$item_filter = " AND p_num =
'{$data['extra']['p_num']}'"
@@ -859,7 +876,6 @@
.' AND p_cat_id =' . (int)
$data['extra']['p_cat_id'];
$location_filter[] = " AND location_code =
'{$location_code}'";
- $ordermethod = '';
$todo = true;
}
else if(isset($data['location']) && $data['location'])
@@ -882,7 +898,6 @@
// Start at the bottom level
$location_filter =
array_reverse($location_filter);
- $ordermethod = ' ORDER by location_code.id ASC';
$todo = true;
}
@@ -892,7 +907,8 @@
}
$sql = "SELECT contact_id FROM
fm_responsibility_contact"
- . " {$this->join} fm_responsibility ON
fm_responsibility_contact.responsibility_id = fm_responsibility.id"
+ . " {$this->join} fm_responsibility_role ON
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
+ . " {$this->join} fm_responsibility ON
fm_responsibility_role.responsibility_id = fm_responsibility.id"
. " {$this->join} fm_responsibility_module ON
fm_responsibility.id = fm_responsibility_module.responsibility_id"
. ' WHERE cat_id =' . (int) $data['cat_id']
. ' AND active = 1 AND active_from < ' . time()
. ' AND (active_to > ' . time() . ' OR active_to = 0) AND expired_on IS NULL'
@@ -938,13 +954,12 @@
public function get_responsible_user_id($data = array())
{
- $responsibility_id = (int)$data['responsibility_id'];
+ $responsibility_role_id =
(int)$data['responsibility_role_id'];
$location_code = $data['location_code'];
$now = time();
$sql = "SELECT contact_id FROM
fm_responsibility_contact"
- . " {$this->join} fm_responsibility ON
fm_responsibility_contact.responsibility_id = fm_responsibility.id"
- . " WHERE fm_responsibility.id =
{$responsibility_id}"
+ . " WHERE responsibility_role_id =
{$responsibility_role_id}"
. " AND active_from < {$now}"
. " AND expired_on IS NULL"
. " AND location_code = '{$location_code}'";
Modified: branches/Version-1_0-branch/property/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uievent.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.uievent.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -656,7 +656,7 @@
$item_id =
phpgw::get_var('item_id');//might be bigint
$id
= phpgw::get_var('id', 'int');
$values =
phpgw::get_var('values');
- $values['responsible_id'] =
phpgw::get_var('contact', 'int', 'POST');
+ $values['contact_id'] = phpgw::get_var('contact',
'int', 'POST');
//
$GLOBALS['phpgw_info']['apps']['manual']['section'] = 'general.edit.' . $type;
@@ -677,7 +677,7 @@
{
$receipt['error'][]=array('msg'=>lang('Please enter a description'));
}
- if(!isset($values['responsible_id']) ||
!$values['responsible_id'])
+ if(!isset($values['contact_id']) ||
!$values['contact_id'])
{
$receipt['error'][]=array('msg'=>lang('Please select a responsible'));
}
@@ -797,7 +797,7 @@
$msgbox_data = $this->bocommon->msgbox_data($receipt);
$contact_data=$this->bocommon->initiate_ui_contact_lookup(array(
- 'contact_id' =>
$values['responsible_id'],
+ 'contact_id' =>
$values['contact_id'],
'field' => 'contact',
'type' => 'form'));
@@ -825,9 +825,6 @@
'value_repeat_interval'
=> isset($values['repeat_interval']) ? $values['repeat_interval'] : 0,
'lang_repeat_interval_statustext'=>
lang('interval'),
- 'lang_responsible'
=> lang('responsible'),
- 'responsible'
=> $this->bo->get_responsible(isset($values['responsible']) ?
$values['responsible'] : ''),
-
'lang_action'
=> lang('action'),
'action'
=> $this->bo->get_action(isset($values['action']) ?
$values['action'] : ''),
Modified: branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -1116,8 +1116,8 @@
$values_assign = $_POST['values_assign'];
$role_id = phpgw::get_var('role_id', 'int');
$receipt = array();
- $_role = CreateObject('property.sogeneric');
- $_role->get_location_info('responsibility_role','');
+ // $_role = CreateObject('property.sogeneric');
+ // $_role->get_location_info('responsibility_role','');
$this->save_sessiondata();
@@ -1135,9 +1135,10 @@
}
else
{
- $role =
$_role->read_single($data=array('id' => $role_id));
+ // $role =
$_role->read_single($data=array('id' => $role_id));
$values['contact_id']
= $contact_id;
- $values['responsibility_id'] =
$role['responsibility_id'];
+ // $values['responsibility_id'] =
$role['responsibility_id'];
+ $values['responsibility_role_id']
= $role_id;
$values['assign']
= $values_assign['assign'];
$values['assign_orig']
= $values_assign['assign_orig'];
$boresponsible =
CreateObject('property.boresponsible');
@@ -1251,6 +1252,11 @@
);
$values_combo_box[4] =
execMethod('property.sogeneric.get_list',$_role_criteria);
+
+ foreach($values_combo_box[4] as &$_role)
+ {
+ $_role['name'] .= ':: ' .
execMethod('property.soresponsible.get_responsibility_name',$_role['id']);
+ }
$default_value = array
('id'=>'','name'=>lang('no role'));
array_unshift
($values_combo_box[4],$default_value);
Modified: branches/Version-1_0-branch/property/inc/class.uiresponsible.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiresponsible.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/inc/class.uiresponsible.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -446,7 +446,7 @@
'parameters' =>
$parameters
);
}
-
+/*
$datatable['rowactions']['action'][] = array
(
'my_name' =>
'contacts',
@@ -458,7 +458,7 @@
)),
'parameters' => $parameters2
);
-
+*/
if($this->acl_add)
{
$datatable['rowactions']['action'][] =
array
@@ -1013,7 +1013,6 @@
'created_on'
=> $entry['created_on'],
'contact_name'
=> $entry['contact_name'],
'remark'
=> $entry['remark'],
- 'ecodimb'
=> $entry['ecodimb'],
'link_edit'
=> $link_edit,
'text_edit'
=> $text_edit,
'lang_edit_text'
=> $lang_edit_text,
@@ -1067,20 +1066,6 @@
'type_id'
=> $type_id
)
)),
- 'sort_ecodimb' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'ecodimb',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uiresponsible.contact',
- 'allrows'
=> $this->allrows,
- 'appname'
=> $this->appname,
- 'location'
=> $this->location,
- 'type_id'
=> $type_id
- )
- )),
'lang_contact' =>
lang('contact'),
'lang_location' =>
lang('location'),
'lang_item' =>
lang('item'),
@@ -1089,7 +1074,6 @@
'lang_created_on' =>
lang('created'),
'lang_created_by' =>
lang('supervisor'),
'lang_remark' =>
lang('remark'),
- 'lang_ecodimb' => lang('dimb'),
'lang_edit' =>
$this->acl_edit ? lang('edit') : '',
// 'lang_delete'
=> $this->acl_delete ? lang('delete') : '',
);
@@ -1209,8 +1193,6 @@
if (isset($values) && is_array($values))
{
- $values['ecodimb'] =
phpgw::get_var('ecodimb');
-
if(!$this->acl_edit)
{
$this->no_access();
@@ -1355,12 +1337,6 @@
)
);
- $ecodimb_data=$bocommon->initiate_ecodimb_lookup(array
- (
- 'ecodimb' =>
$values['ecodimb'],
- 'ecodimb_descr' =>
$values['ecodimb_descr'])
- );
-
$link_data = array
(
'menuaction' =>
'property.uiresponsible.edit_contact',
@@ -1407,7 +1383,6 @@
$data = array
(
- 'ecodimb_data'
=> $ecodimb_data,
'value_entry_date'
=> isset($values['entry_date']) ? $values['entry_date'] : '',
'value_name'
=> isset($values['name']) ? $values['name'] : '',
'value_remark'
=> isset($values['remark']) ? $values['remark'] : '',
Modified: branches/Version-1_0-branch/property/setup/default_records.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/default_records.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/setup/default_records.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -585,11 +585,27 @@
$default_attrib['input_text'][] ='user_id';
$default_attrib['statustext'][] ='user_id';
+ $default_attrib['id'][]= 6;
+ $default_attrib['column_name'][]= 'modified_by';
+ $default_attrib['type'][]='user';
+ $default_attrib['precision'][] =4;
+ $default_attrib['nullable'][] ='true';
+ $default_attrib['input_text'][] ='modified_by';
+ $default_attrib['statustext'][] ='modified_by';
+
+ $default_attrib['id'][]= 7;
+ $default_attrib['column_name'][]= 'modified_on';
+ $default_attrib['type'][]='DT';
+ $default_attrib['precision'][] =8;
+ $default_attrib['nullable'][] ='true';
+ $default_attrib['input_text'][] ='modified_on';
+ $default_attrib['statustext'][] ='modified_on';
+
for ($i=1; $i<$location_type+1; $i++)
{
$pk[$i-1]= 'loc' . $i;
- $default_attrib['id'][]= $i+5;
+ $default_attrib['id'][]= $i+7;
$default_attrib['column_name'][]= 'loc' . $i;
$default_attrib['type'][]='V';
$default_attrib['precision'][] =4;
@@ -648,60 +664,60 @@
# Dumping data for table fm_location_attrib
#
$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.1');
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 8, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 9, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL, NULL,
NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 10, 'mva', 'mva', 'Status', 'I', NULL, 3, NULL, 4, NULL, NULL,
'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 11, 'kostra_id', 'kostra_id', 'kostra_id', 'I', NULL, 4, NULL,
4, NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'part_of_town_id', 'part_of_town_id', 'part_of_town_id',
'I', NULL, NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'owner_id', 'owner_id', 'owner_id', 'I', NULL, NULL, NULL,
4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 8, 1, 'OK')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 8, 2, 'Not OK')");
-
-
-$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.2');
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 9, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 10, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL,
NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 11, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 3,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 9, 1, 'OK')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 9, 2, 'Not OK')");
-
-$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.3');
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 10, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 11, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL,
NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 3,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'mva', 'mva', 'Status', 'I', NULL, 3, NULL, 4, NULL, NULL,
'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'kostra_id', 'kostra_id', 'kostra_id', 'I', NULL, 4, NULL,
4, NULL, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'part_of_town_id', 'part_of_town_id', 'part_of_town_id',
'I', NULL, NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'owner_id', 'owner_id', 'owner_id', 'I', NULL, NULL, NULL,
4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 1, 'OK')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 2, 'Not OK')");
-$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.4');
+$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.2');
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 11, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL,
NULL, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'street_id', 'street_id', 'street_id', 'I', NULL, NULL,
NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'street_number', 'street_number', 'street_number', 'I',
NULL, NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'tenant_id', 'tenant_id', 'tenant_id', 'I', NULL, NULL,
NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 4,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 3,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 11, 1, 'OK')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 11, 2, 'Not OK')");
+$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.3');
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 12, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL,
NULL, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 3,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 12, 1, 'OK')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 12, 2, 'Not OK')");
+
+$location_id = $GLOBALS['phpgw']->locations->get_id('property', '.location.4');
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 13, 'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL,
NULL, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 14, 'remark', 'Remark', 'Remark', 'T', NULL, 2, NULL, NULL,
NULL, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 15, 'street_id', 'street_id', 'street_id', 'I', NULL, NULL,
NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 16, 'street_number', 'street_number', 'street_number', 'I',
NULL, NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 17, 'tenant_id', 'tenant_id', 'tenant_id', 'I', NULL, NULL,
NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 18, 'change_type', 'change_type', 'change_type', 'I', NULL,
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 19, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 4,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 20, 'area_gross', 'Gross area', 'Sum of the areas included
within the outside face of the exterior walls of a building.', 'N', NULL, 5,
20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 21, 'area_net', 'Net area', 'The wall-to-wall floor area of a
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute
(location_id, id, column_name, input_text, statustext, datatype, list,
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES
($location_id, 22, 'area_usable', 'Usable area', 'generally measured from paint
to paint inside the permanent walls and to the middle of partitions separating
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 13, 1, 'OK')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice
(location_id, attrib_id, id, value) VALUES ($location_id, 13, 2, 'Not OK')");
+
+
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_action_pending_category
(num, name, descr) VALUES ('approval', 'Approval', 'Please approve the item
requested')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_action_pending_category
(num, name, descr) VALUES ('remind', 'Remind', 'This is a reminder of task
assigned')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_action_pending_category
(num, name, descr) VALUES ('accept_delivery', 'Accept delivery', 'Please accept
delivery on this item')");
Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php 2015-08-11
23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php 2015-08-12
09:25:22 UTC (rev 13702)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.690';
+ $setup_info['property']['version'] = '0.9.17.693';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -198,7 +198,9 @@
'rental_area' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00')
+ 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array('loc1'),
'fk' => array('fm_location1_category' =>
array('category' => 'id')),
@@ -224,7 +226,9 @@
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
+ 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array(),
'fk' => array(),
@@ -256,7 +260,9 @@
'rental_area' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00')
+ 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array('loc1','loc2'),
'fk' => array(
@@ -282,7 +288,9 @@
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
+ 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array(),
'fk' => array(),
@@ -315,7 +323,9 @@
'rental_area' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00')
+ 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array('loc1','loc2','loc3'),
'fk' => array(
@@ -342,7 +352,9 @@
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
+ 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array(),
'fk' => array(),
@@ -380,7 +392,9 @@
'rental_area' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00')
+ 'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array('loc1','loc2','loc3','loc4'),
'fk' => array(
@@ -411,7 +425,9 @@
'area_gross' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_net' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
'area_usable' => array('type' =>
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' =>
'0.00'),
- 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
+ 'exp_date' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp'),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp')
),
'pk' => array(),
'fk' => array(),
@@ -2509,7 +2525,7 @@
'fm_responsibility_contact' => array(
'fd' => array(
'id' => array('type' => 'auto','precision' =>
'4','nullable' => False),
- 'responsibility_id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
+ 'responsibility_role_id' => array('type' =>
'int', 'precision' => 4,'nullable' => False),
'contact_id' => array('type' => 'int',
'precision' => 4,'nullable' => True),
'location_code' => array('type' => 'varchar',
'precision' => 20,'nullable' => True),
'p_num' => array('type' => 'varchar',
'precision' => 15,'nullable' => True),
@@ -2522,12 +2538,11 @@
'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),
- 'ecodimb' => array('type' => 'int','precision'
=> 4,'nullable' => True),
'remark' => array('type' => 'text','nullable'
=> True)
),
'pk' => array('id'),
'fk' => array(
- 'fm_responsibility' =>
array('responsibility_id' => 'id'),
+ 'fm_responsibility_role' =>
array('responsibility_role_id' => 'id'),
'phpgw_contact' => array('contact_id' =>
'contact_id')
),
'ix' => array('location_code'),
Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php
2015-08-12 09:25:22 UTC (rev 13702)
@@ -8436,3 +8436,150 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ /**
+ * Update property version from 0.9.17.690 to 0.9.17.691
+ * Add modifyinfo to location-register.
+ */
+ $test[] = '0.9.17.690';
+ function property_upgrade0_9_17_690()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $attributes= array(
+ array(
+ 'column_name' => 'modified_by',
+ 'type' => 'user',
+ 'precision' => 4,
+ 'nullable' => 'true',
+ 'input_text' => 'modified_by',
+ 'statustext' => 'modified_by'
+ ),
+ array(
+ 'column_name' => 'modified_on',
+ 'type' => 'DT',
+ 'precision' => 8,
+ 'nullable' => 'true',
+ 'input_text' => 'modified_on',
+ 'statustext' => 'modified_on'
+
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query('SELECT count(*) as cnt
FROM fm_location_type');
+ $GLOBALS['phpgw_setup']->oProc->next_record();
+ $levels = $GLOBALS['phpgw_setup']->oProc->f('cnt');
+
+ for ($i=1; $i<($levels +1); $i++)
+ {
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn("fm_location{$i}",'modified_by',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => True
+ )
+ );
+
$GLOBALS['phpgw_setup']->oProc->AddColumn("fm_location{$i}",'modified_on',array(
+ 'type' => 'timestamp',
+ 'nullable' => True,
+ 'default' => 'current_timestamp'
+ )
+ );
+
$GLOBALS['phpgw_setup']->oProc->AddColumn("fm_location{$i}_history",'modified_by',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => True
+ )
+ );
+
$GLOBALS['phpgw_setup']->oProc->AddColumn("fm_location{$i}_history",'modified_on',array(
+ 'type' => 'timestamp',
+ 'nullable' => True,
+ 'default' => 'current_timestamp'
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
fm_location{$i} SET modified_on = NULL");
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
fm_location{$i}_history SET modified_on = NULL");
+
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', ".location.{$i}");
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT max(id)
as id FROM phpgw_cust_attribute WHERE location_id = {$location_id}");
+ $GLOBALS['phpgw_setup']->oProc->next_record();
+ $id = $GLOBALS['phpgw_setup']->oProc->f('id');
+
+ foreach ( $attributes as $attrib)
+ {
+ $id ++;
+
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT
INTO phpgw_cust_attribute (location_id,
id,column_name,datatype,precision_,input_text,statustext,nullable,custom)"
+ . " VALUES ("
+ . $location_id. ','
+ . $id . ",'"
+ . $attrib['column_name'] . "','"
+ . $attrib['type'] . "',"
+ . $attrib['precision'] . ",'"
+ . $attrib['input_text'] . "','"
+ . $attrib['statustext'] . "','"
+ . $attrib['nullable'] . "',NULL)");
+
+ }
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
phpgw_cust_attribute SET input_text = column_name WHERE input_text = 'dummy'");
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.691';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+ /**
+ * Update property version from 0.9.17.691 to 0.9.17.692
+ * Alter field name.
+ */
+ $test[] = '0.9.17.691';
+ function property_upgrade0_9_17_691()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $MetaForeignKeys =
$GLOBALS['phpgw_setup']->oProc->m_odb->MetaForeignKeys('fm_responsibility_contact');
+
+ if(isset($MetaForeignKeys['fm_responsibility']) &&
$MetaForeignKeys['fm_responsibility'])
+ {
+ $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE
fm_responsibility_contact DROP CONSTRAINT
fm_responsibility_contact_responsibility_id_fkey");
+ }
+
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_responsibility_contact','responsibility_id','responsibility_role_id');
+
+ $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE
fm_responsibility_contact"
+ . " ADD CONSTRAINT
fm_responsibility_contact_responsibility_role_id_fkey"
+ . " FOREIGN KEY (responsibility_role_id)"
+ . " REFERENCES fm_responsibility_role (id) MATCH SIMPLE"
+ . " ON UPDATE NO ACTION ON DELETE NO ACTION"
+ );
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.692';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+ /**
+ * Update property version from 0.9.17.691 to 0.9.17.692
+ * Alter field name.
+ */
+ $test[] = '0.9.17.692';
+ function property_upgrade0_9_17_692()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('fm_responsibility_contact',array(),'ecodimb');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.693';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
\ No newline at end of file
Modified: branches/Version-1_0-branch/property/templates/base/responsible.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/responsible.xsl
2015-08-11 23:09:13 UTC (rev 13701)
+++ branches/Version-1_0-branch/property/templates/base/responsible.xsl
2015-08-12 09:25:22 UTC (rev 13702)
@@ -407,11 +407,6 @@
<xsl:value-of select="lang_contact"/>
</td>
<td class="th_text" width="10%" align="left">
- <a href="{sort_ecodimb}">
- <xsl:value-of select="lang_ecodimb"/>
- </a>
- </td>
- <td class="th_text" width="10%" align="left">
<a href="{$sort_location}">
<xsl:value-of select="lang_location"/>
</a>
@@ -466,9 +461,6 @@
<xsl:value-of select="contact_name"/>
</td>
<td align="left">
- <xsl:value-of select="ecodimb"/>
- </td>
- <td align="left">
<xsl:value-of select="location_code"/>
</td>
<td align="left">
@@ -629,7 +621,6 @@
</input>
</td>
</tr>
- <xsl:call-template name="ecodimb_form"/>
<xsl:call-template
name="location_form"/>
<tr>
<td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13702] Merge 13602:13701 from trunk,
Sigurd Nes <=