-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks_tab.addedit.unit_costs.php
157 lines (148 loc) · 7.23 KB
/
tasks_tab.addedit.unit_costs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/*
Unitcost tab addedit file
Written by Alejandro Imass <[email protected]>
Version 1.0 completed 2006/08/14
Used Resources modules written by ajdonnison as base
*/
global $AppUI, $baseDir, $users, $task_id, $task_project, $obj;
global $projTasksWithEndDates, $tab, $loadFromTab;
// load module class
require_once $AppUI->getModuleClass('unitcost');
$unitcost_task_costs =& new Cunitcost_task_costs;
$unitcost_task_costs->load($task_id);
// get the values
$material_unit_cost = $unitcost_task_costs->material_unit_cost;
$equipment_unit_cost = $unitcost_task_costs->equipment_unit_cost;
$labor_unit_cost = $unitcost_task_costs->labor_unit_cost;
$other_unit_cost = $unitcost_task_costs->other_unit_cost;
$total_unit_cost = $unitcost_task_costs->total_unit_cost;
$task_total_cost = $unitcost_task_costs->task_total_cost;
$norm_ref = $unitcost_task_costs->norm_ref;
$norm_dsc = $unitcost_task_costs->norm_dsc;
$unit_of_measure = $unitcost_task_costs->unit_of_measure;
$total_units = $unitcost_task_costs->total_units;
$performance = $unitcost_task_costs->performance;
$AppUI->getModuleJS('unitcost', 'tabs');
?>
<form name="otherFrm" action="?m=tasks&a=addedit&task_project=<?php echo $task_project; ?>" method="post" >
<input type="hidden" name="sub_form" value="1" />
<input type="hidden" name="task_id" value="<?php echo $task_id; ?>" />
<input type="hidden" name="dosql" value="do_task_aed" />
<?php include "$baseDir/modules/unitcost/unitcost_error_messages.php"?>
<table width="100%" border="1" cellpadding="4" cellspacing="0" class="std">
<tr>
<td valign="top" align="center">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<!-- Unit Price Analysis (left side)-->
<td valign="top">
<table widht="100%" border="0">
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Material Unit Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input onblur="javascript:changedValue('material_unit_cost')" type="text" name="material_unit_cost" id="material_unit_cost" value="<?php echo $material_unit_cost ?>" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Equipment Unit Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input onblur="javascript:changedValue('equipment_unit_cost')" type="text" name="equipment_unit_cost" id="equipment_unit_cost" value="<?php echo $equipment_unit_cost ?>" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Labor Unit Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input onblur="javascript:changedValue('labor_unit_cost')" type="text" name="labor_unit_cost" id="labor_unit_cost" value="<?php echo $labor_unit_cost ?>" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Other Unit Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input onblur="javascript:changedValue('other_unit_cost')" type="text" name="other_unit_cost" id="other_unit_cost" value="<?php echo $other_unit_cost ?>" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Total Unit Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input type="text" name="total_unit_cost" id="total_unit_cost" value="<?php echo $total_unit_cost ?>" disabled="disabled" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Unit of Measure' );?>
</td>
<td>
<input type="text" name="unit_of_measure" id="unit_of_measure" value="<?php echo $unit_of_measure ?>" class="text" size="5" maxlength="5"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Total Units' );?>
</td>
<td>
<input onblur="javascript:changedValue('total_units')" type="text" name="total_units" id="total_units" value="<?php echo $total_units ?>" class="text" size="13" maxlength="13"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Task Total Cost' );?> <?php echo $dPconfig['currency_symbol'] ?>
</td>
<td>
<input type="text" name="task_total_cost" id="task_total_cost" value="<?php echo $task_total_cost ?>" disabled="disabled" class="text" size="18" maxlength="18"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Performance' );?>
</td>
<td>
<input onblur="javascript:changedValue('performance')" type="text" name="performance" id="performance" value="<?php echo $performance ?>" class="text" size="12" maxlength="12"/>
<?php echo $AppUI->_( 'per' );?>
<?php
echo arraySelect( $durnTypes, 'task_duration_type2', 'class="text" id="task_duration_type2" onblur="javascript:changedValue(\'task_duration_type2\')"', $obj->task_duration_type, true );
?>
</td>
</tr>
</table>
</td>
<!-- Unit Price Analysis (right side) -->
<td valign="top">
<table width="100%">
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Normative Reference' );?>
</td>
<td>
<input type="text" name="norm_ref" id="norm_ref" value="<?php echo $norm_ref ?>" class="text" size="40" maxlength="40"/>
</td>
</tr>
<tr>
<td align="right" nowrap="nowrap">
<?php echo $AppUI->_( 'Normative Description' );?>
</td>
<td>
<textarea name="norm_dsc" id="norm_dsc" class="textarea" cols="40" rows="8"/><?php echo $norm_dsc ?></textarea>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<script language="javascript">
subForm.push(new FormDefinition(<?php echo $tab; ?>, document.otherFrm, checkOther, saveOther));
</script>