Skip to main content
Skip table of contents

wsiCreateJobMasterCostCode

Table Name: JC40202

Other tables affected: <none>
Other stored procedures called: wsiCreateJobMasterCostCodePre, wsiCreateJobMasterCostCodePost
Description:
This procedure allows the insert or update of records into the Job Master Cost Code table.

Element NameData TypeLengthRequiredDefaultDescription

@I_vWSCostCodeNumber1

char

7

Yes

'

I_vWSCostCodeNumber1 length is equal to the value in JC40103.Cost_Code_Seg_Length_1

@I_vWSCostCodeNumber2

char

7

Yes

'

I_vWSCostCodeNumber2 length is equal to the value in JC40103.Cost_Code_Seg_Length_2

@I_vWSCostCodeNumber3

char

7

Yes

'

I_vWSCostCodeNumber3 length is equal to the value in JC40103.Cost_Code_Seg_Length_3

@I_vWSCostCodeNumber4

char

7

Yes

'

I_vWSCostCodeNumber4 length is equal to the value in JC40103.Cost_Code_Seg_Length_4

@I_vCostCodeAlias

char

27

No

'

This value must be empty. The stored procedure will construct the Cost Code Alias based on Cost Code Numbers and Cost Element.

@I_vCostCodeDescription

char

31

No

'

Cannot be blank

@I_vAccountIndex

int

10

No

0

I_vAccountIndex exists in GL00100 and is not a unit account. I_vAccountIndex must be zero when using option "Cost Code Debit Posting Accounts by Division" since the Account Index will default in when the cost code is added to a job. I_vAccountIndex must not be zero when using "Cost Code Debit Posting Account by Cost Codes", unless the Cost Code exists already in which case I_vAccountIndex will default in. I_vAccountIndex must be for an active account.

@I_vNextSubdivisionType

smallint

5

No

0

 

@I_vProfitTypeNumber

smallint

5

No

0

A) I_vProfitTypeNumber exists in JC40208 B) if I_vProfitTypeNumber is 9, then I_vCostElement must be 1

@I_vProfitAmount

numeric

19,5

No

0

A) If I_vProfitTypeNumber = 3, then I_vProfitAmount cannot equal 100 B) If I_vProfitTypeNumber = 1 or I_vProfitTypeNumber = 2, then I_vProfitAmount must be zero

@I_vTypeofTransaction

smallint

5

No

0

The type of transaction is 1, 2, 3, or 4

@I_vCostElement

smallint

5

Yes

0

I_vCostElement exists in JC40209

@I_vEstimatedStartDate

datetime

 

No

01/01/1900'

 

@I_vEstimatedCompletionDate

datetime

 

No

01/01/1900'

 

@I_vCostCodeEstimatedUnits

numeric

19,5

No

0

 

@I_vEstimatedAmtUnits

numeric

19,5

No

0

 

@I_vEstimatedMeasureCode

char

7

No

'

I_vEstimatedMeasureCode exists in JC40102

@I_vCostCodeEstimatedCost

numeric

19,5

No

0

 

@I_vCostCodeRvsdEstimatedCost

numeric

19,5

No

0

 

@I_vCostCodeForecastedCost

numeric

19,5

No

0

 

@I_vCostCodeRvsdForecast

numeric

19,5

No

0

 

@I_vProductionEstimateQty

numeric

19,5

No

0

 

@I_vProductionQtyUnit

numeric

19,5

No

0

 

@I_vProductionMeasureCode

char

7

No

'

I_vProductionMeasureCode exists in JC40102

@I_vVendorNumber

char

25

No

'

I_vVendorNumber exists in PM00200

@I_vItemNumber

char

31

No

'

 

@I_vPurchaseOrderNumber

char

21

No

'

 

@I_vWorkersComp

char

7

No

'

I_vWorkersComp exists in UPR40700

@I_vUserDefine1

char

31

No

'

 

@I_vUserDefine2

char

31

No

'

 

@I_vUserDefined1

char

21

No

'

 

@I_vUserDefined2

char

21

No

'

 

@I_vUserDefinedInteger1

int

10

No

0

 

@I_vUserDefinedInteger2

int

10

No

0

 

@I_vUserDefinedInteger3

int

10

No

0

 

@I_vUserDefinedInteger4

int

10

No

0

 

@I_vUserDefinedDollar1

numeric

19,5

No

0

 

@I_vUserDefinedDollar2

numeric

19,5

No

0

 

@I_vUserDefinedDollar3

numeric

19,5

No

0

 

@I_vUserDefinedDollar4

numeric

19,5

No

0

 

@I_vUserDefinedDate1

datetime

 

No

01/01/1900'

 

@I_vUserDefinedDate2

datetime

 

No

01/01/1900'

 

@I_vWSUserDefinedDate3

datetime

 

No

01/01/1900'

 

@I_vWSUserDefinedDate4

datetime

 

No

01/01/1900'

 

@I_vUserDefinedCB1

tinyint

3

No

0

 

@I_vUserDefinedCB2

tinyint

3

No

0

 

@I_vUserDefinedCB3

tinyint

3

No

0

 

@I_vUserDefinedCB4

tinyint

3

No

0

 

@I_vWennsoftAffiliate

char

15

No

'

 

@I_vWennsoftBranch

char

15

No

'

 

@I_vWennsoftRegion

char

15

No

'

 

@I_vSVLanguageID

smallint

5

No

0

 

@I_vTimeZone

char

3

No

'

 

@I_vWSReservedCB1

tinyint

3

No

0

 

@I_vWSReservedCB2

tinyint

3

No

0

 

@I_vWSReservedCB3

tinyint

3

No

0

 

@I_vWSReservedCB4

tinyint

3

No

0

 

@I_vWSReservedCB5

tinyint

3

No

0

 

@I_vWSReservedCB6

tinyint

3

No

0

 

@I_vWSReservedCB7

tinyint

3

No

0

 

@I_vWSReservedCB8

tinyint

3

No

0

 

@I_vWSReservedCB9

tinyint

3

No

0

 

@I_vWSReservedCB10

tinyint

3

No

0

 

@I_vWSReservedSTR1

char

11

No

'

 

@I_vWSReservedSTR2

char

11

No

'

 

@I_vUpdateIfExists

tinyint

3

Yes

0

 

@I_vWennSoftTablesOnly

tinyint

3

Yes

0

 

@I_vOnlyValidate

tinyint

3

Yes

0

 

@I_vUSRDEFND1

char

50

No

'

 

@I_vUSRDEFND2

char

50

No

'

 

@I_vUSRDEFND3

char

50

No

'

 

@I_vUSRDEFND4

varchar

8000

No

'

 

@I_vUSRDEFND5

varchar

8000

No

'

 

@I_vReturnErrorText

tinyint

3

No

1

 

@O_iErrorState

int

10

No

0

 

@oErrString

varchar

255

No

'

 

Error Codes

Error CodeDescription

51089

The Cost Element must be in the range of 1 to 9.

52243

The length of the first Job Cost Code Segment is incorrect.

52244

The length of the second Job Cost Code Segment is incorrect.

52245

The length of the third Job Cost Code Segment is incorrect.

52246

The length of the fourth Job Cost Code Segment is incorrect.

52293

Cost Code Alias must be empty.

51205

The profit type number does not exist in the profit type setup table.

52250

The Cost Element must be 1 for Profit Type Number 9 Service Labor Rate Group.

52251

The Profit Amount cannot be 100 for a Job Cost Code with Profit Type Number 3 Percent Margin.

52252

The Profit Amount must be zero for Job Cost Codes with Profit Type Number 1 Non-billable.

52253

The Profit Amount must be zero for Job Cost Codes with Profit Type Number 2 None.

52254

The Type of Transaction value for a Job Cost Code must be 1, 2, 3, or 4.

52298

The account index must be zero when using option Cost Code Debit Posting Accounts by Division.

51164

Account Index does not exist.

51165

Account number is inactive.

52264

Unit accounts cannot be used with job cost codes.

52256

The Production Measure Code does not exist.

52257

The Estimated Measure Code does not exist.

52259

The Workers Compensation Code does not exist.

52261

The Vendor ID does not exist.

52262

The Cost Code Description cannot be blank for a Job Cost Code.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.