dev.obliquid.com: obliquid
[ class tree: obliquid ] [ index: obliquid ] [ all elements ]

Class: prj

Source Location: Program_Root/classes/obliquid/prj.php

Class Overview


A class to provide general purpose variables and functions for the project module


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 29]
A class to provide general purpose variables and functions for the project module





[ Top ]


Class Variables

$dspstatus =

[line 32]



Tags:

var:  - translations for the project level status values

Type:   array


[ Top ]

$id_prj = 0

[line 47]



Tags:

var:  of the current project, if any

Type:   id


[ Top ]

$open = 1, $ordered2, $completed3, $rejected4, $paid5

[line 41]



Tags:

var:  status constants

Type:   project


[ Top ]

$phopen = 1, $phclosed2

[line 44]



Tags:

var:  status constants

Type:   phase


[ Top ]

$phstatus =

[line 35]



Tags:

var:  - translations for the phase level status values

Type:   array


[ Top ]

$status =

[line 38]



Tags:

var:  - translations for the project level status input values

Type:   array


[ Top ]



Class Methods


constructor prj [line 50]

void prj( [mixed $id_prj = 0])

constructor





[ Top ]

method costs [line 137]

an &costs( integer $prj)

does the complicated "real bid" calculations.



Tags:

return:  associative array with the following indexes
   ?     supplier   ?
   int   hours      Total bid hours
   float tripamt    Total travel expences
   float realbid    Real Bid, if the real bid is 0, becomes calcbid
   float calcbid    Calculated Bid (bid hours * hourly rate)
   float scosts     Supplier costs
   float surplus    Total surplus
   float rhourly    Bid hourly revenue
   float shourly    Hourly surplus
   int   acthours   Actual hours
   int   acttrips   Actual trips
   float actrhourly Actual hourly revenue
   float actsurplus Actual total surplus
   float actshourly Actual hourly surplus
  


Parameters:

integer   $prj   id_project (id of prj_project table)

[ Top ]

method deletePhase [line 78]

void deletePhase( integer $id_phase, [integer $id_prj = 0])

Deletes the chosen phase from the current project.

Note: you have to pass the current project in the constructor, or here as the second optional parameter






Parameters:

integer   $id_phase   phase id
integer   $id_prj   project id, optional

[ Top ]

method duedate [line 224]

void duedate( mixed $fdate, mixed $days)

Calculates the due date as 'days' from 'fdate', ignoring Saturday and Sunday





[ Top ]

method fmt_amount [line 107]

void fmt_amount( mixed $floatamt)

formats a money amount based on whether in $ or Euro's





[ Top ]

method updateStatus [line 93]

void updateStatus( integer $status, [integer $id_prj = 0])

Updates status of a project to the new status

Note: you have to pass the current project in the constructor, or here as the second optional parameter






Parameters:

integer   $status   new status Id
integer   $id_prj   project id, optional

[ Top ]


Documentation generated on Tue, 29 Mar 2005 09:04:37 -0800 by phpDocumentor 1.2.0rc2