ContractorJobHandler

This class contains the functions to perform the following:

  • Retrieve: Contractor Job(s)

api
package simPROAPI
subpackage Projects
author Edgar Luzardo
version 2013-07-05

 Methods

ContractorJobInsert

Insert(int $CompanyID, array $ContractorJobDetails) : int
Static
<?php
$ContractorJobDetails = array(
    "ProjectType"=>"Job"|"Quote",
    "ProjectID"=>0,
    "SectionCostCentreID"=>0,
    "ContractorID"=>0,
    "Date"=>"Y-m-d",
    "ApplyRetention"=>bool,
    "RetentionPercAmount"=>0,
    "RetentionPercAmountPerClaim"=>0,
    "RetentionPeriod"=>0,
    "Description"=>"",
    "ContractorSupplyMaterials"=>bool,
    "Items"=>array(
            array("ItemID"=>0,"Quantity"=>0),
            array("ItemID"=>0,"Quantity"=>0)
         )
    "Labour"=>0,
    "Materials"=>0,
    "TaxCodeID"=>0
    );
?>

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$ContractorJobDetails

array

an associative array of Contractor Job information.

Returns

int

ContractorJobRetrieve

Retrieve(int $CompanyID, int $ContractorJobNo) : array
Static

This function retrieves a contractor job with a specific id

uses \ContractorInvoiceHandler::RetrieveList()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$ContractorJobNo

int

the contractor job number to retrieve

Returns

array

ContractorJobRetrieveList

RetrieveList(int $CompanyID, array $ContractorJobNos) : array
Static

This function retrieves details on the provided list of contractor job ids

used_by \ContractorJobHandler::Search()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$ContractorJobNos

array

list of Contractor Job ID's to retrieve.

Returns

array

ContractorJobUpdate

Update(int $CompanyID, int $ContractorJobID, array $ContractorJobDetails) : int
Static
<?php
$ContractorJobDetails = array(
    "Date"=>"Y-m-d",
    "ApplyRetention"=>bool,
    "RetentionPercAmount"=>0,
    "RetentionPercAmountPerClaim"=>0,
    "RetentionPeriod"=>0,
    "Description"=>"",
    "ContractorSupplyMaterials"=>bool,
    "Items"=>array(
            array("ItemID"=>0,"Quantity"=>0),
            array("ItemID"=>0,"Quantity"=>0)
         )
    "Labour"=>0,
    "Materials"=>0,
    "TaxCodeID"=>0
    );
?>

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$ContractorJobID

int

the Contractor Job ID to update with the supplied information.

$ContractorJobDetails

array

an associative array of Contractor Job information.

Returns

int