Skip to main content
Skip table of contents

wsiJCChangeOrdersDetailMSTR

Table Name: JC01002

Other tables affected: <none>
Other stored procedures called: wsiJCChangeOrdersDetailMSTRPre, wsiJCChangeOrdersDetailMSTRPost, wsiJCJobDetailMSTRPre, wsiJCJobDetailMSTRPost
Description:
This procedure allows the insert or update of records into the Job Cost Change Orders Detail Master table.

Element NameData TypeLengthRequiredDefaultDescription
@I_vShortDescription char30No
If the Change Order Cost Code Estimate is the original one, the default description will be ‘original estimate’.  You do not need to provide it as it should default to that description.

@I_vWSJobNumber

char

17

Yes


I_vWSJobNumber must be an existing/active job.

@I_vWSProjectNumber

char

17

No

'

I_vWSProjectNumber must be an existing/active project and the project must be assigned to the job. If I_vWSProjectNumber is updated with the project assigned to the job if the passed in value is empty.

@I_vChangeOrderNum

char

15

Yes


I_vChangeOrderNum must contain a value and must also be an existing change order assigned to the job.

@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_vCostCodeNumberAlias

char

35

No

'

An empty cost code alias value must be passed in. The alias will be constructed from the passed in cost code numbers and element.

@I_vCostCodeDescription

char

31

Yes

'

I_vCostCodeDescription cannot be empty.

@I_vCostElement

smallint

5

Yes


I_vCostElement exists in JC40209

@I_vAccountIndex

int

10

No

0

The account index should be a valid account index stored in table GL00100. The account should be active and cannot be a unit (GL00100.ACCTTYPE = 2) account. When using option "Cost Code Debit Posting Accounts: Division" (JC40305.GB_CC_Acct_Setup = 1) pass in 0 or NULL. The account index will default in based on the account index stored in JC40302 for the division assigned to the job and the I_vCostElement passed into the stored procedure. If you do pass in a value, make sure to pass in the account index assigned in JC40302. It may be easier to just pass in NULL, since the default value will be correct. When using option "Cost Code Debit Posting Accounts: Cost Codes" (JC40305.GB_CC_Acct_Setup = 1) pass in a NULL or 0 index to default in the account index from Job Cost Code Master Setup (JC40202). If the cost code does not exist in JC40202, then you'll have to pass in a valid account index.

@I_vWSManagerID

char

15

No

'

I_vWSManagerID exists in UPR00100

@I_vTransactionDocNumber

numeric

19,5

No

0


@I_vTypeofTransaction

smallint

5

Yes

0

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

@I_vProfitTypeNumber

smallint

5

Yes

0

A) I_vProfitTypeNumber exists in JC40208 B) I_vProfitTypeNumber must be 2 if the job is a "Fixed Amount" contract and I_vAddedByCOModule is 0 C) I_vProfitTypeNumber may be the values 1 thru 9 if I_vAddedByCOModule is 1 D) 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_vProductionEstimateQty

numeric

19,5

No

0


@I_vProductionQtyUnit

numeric

19,5

No

0


@I_vProductionMeasureCode

char

7

No

'

I_vProductionMeasureCode exists in JC40102

@I_vEstimatedMeasureCode

char

7

No

'

I_vEstimatedMeasureCode exists in JC40102

@I_vChangeOrderEstimatedUnits

numeric

19,5

No

0


@I_vCOEstimatedAmtUnits

numeric

19,5

No

0


@I_vChangeOrderEstimatedCost

numeric

19,5

No

0


@I_vAddedByCOModule

tinyint

3

No

0

I_vAddedByCOModule is 0 or 1

@I_vPostingStatus

smallint

5

No

0


@I_vScheduleStartDate

datetime


No

01/01/1900'


@I_vScheduledCompletionDate

datetime


No

01/01/1900'


@I_vVendorNumber

char

25

No

'

I_vVendorNumber exists in PM00200

@I_vInventoryItemNumber

char

21

No

'


@I_vPurchaseOrderNumber

char

21

No

'


@I_vTrackProductionQty

tinyint

3

No

0

I_vTrackProductionQty is 0 or 1

@I_vUserID

char

15

No

'


@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_vLaborGroupName

char

15

No

'

I_vLaborGroupName exists in SV00123

@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_vDEXROWID

int

10

No

0


@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

51017

The Job does not exist in Signature.

51094

Job is inactive.

51090

The Project Number does not exist.

51234

Project Number must be for an Active project.

52279

The project number is not assigned to the job.

52265

The change order number must contain a value.

52117

The Change Order does not exist for this job.

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.

51089

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

52293

Cost Code Alias must be empty.

52299

'The Cost Code Description cannot be blank for a Change Order Cost Code.

51164

Account Index does not exist.

52292

Cost Code Debit Posting Accounts by Division requires the use of the Account Index setup in JC40302 for the Division assigned to the Job and the Cost Element assigned to the Cost Code.

51165

Account number is inactive.

52264

Unit accounts cannot be used with job cost codes.

51118

The project manager does not exist in the payroll master table.

52248

The Job Cost Code Added By Change Order flag must be set to 0 or 1.

51205

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

52249

The Profit Type Number for Job Cost Codes not added by Change Orders must be 2 for Jobs with Fixed Amount Contract Types.

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.

52255

The Track Production Quantity flag for a Job Cost Code must be set to 0 or 1.

52256

The Production Measure Code does not exist.

52257

The Estimated Measure Code does not exist.

52260

The Labor Group Name does not exist.

52261

The Vendor ID does not exist.

JavaScript errors detected

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

If this problem persists, please contact our support.