Skip to main content
Skip table of contents

wsiSMSContract

Table Name: SV00500

Other tables affected: SV00564, SV00509, sv00510, SV00053
Other stored procedures called: wsiSMSContractPre.sql, wsiSMSContractPost.sql, SMS_Build_Contract_Billing_Schedule.sql, SMS_Build_Contract_Billing_SchedulePre.sql,SMS_Build_Contract_Billing_SchedulePost.sql, SMS_Build_Contract_Revenue_Schedule.sql, SMS_Build_Contract_Revenue_SchedulePre.sql, SMS_Build_Contract_Revenue_SchedulePost.sql
Description:
This procedure allows the insert of records into the contract master table. This procedure will call out to other procedures to generate the contract billing schedule and the revenue schedule. This procedure will also accommodate contracts with some defined starting balance amount and date and will create one posted record in the billing, revenue and invoice table to reflect this starting balance.

Element NameData TypeLengthRequiredDefaultDescription

CustomerNumber

char

15

Yes

 

Validated

AddressCode

char

15

Yes

 

Validated

WSContractNumber

char

11

Yes

 

Validated

WSContractNumberSequence

int

10

No

1

Validated

UserID

char

15

No

 

Not validated or used by core product

*TechnicianID

char

15

No

 

*Not validated or used by core product

TechnicianTeam

char

15

No

 

Not validated or used by core product

Technician

char

11

No

 

Validated

CorporateContractNumber

char

21

No

 

Validated

CorporateInvoiceNumber

char

17

No

 

 

ContractAmount

numeric

19,5

No

0

 

BillFreq

smallint

5

No

1

Validated - 1 monthly, 2 quarterly, 3 annual, 4 semi-annual, 6 every other month

StartingBalanceYTD

numeric

19, 5

No

0

Validated

StartingBalanceTTD

numeric

19, 5

No

0

Validated

StartingBalanceDate

datetime

 

No

1/1/1900'

Validated

AmountBilled0

numeric

19,5

No

0

 

SalespersonID

char

15

No

 

Validated

AnnualContractValue

numeric

19,5

No

0

 

RevenueRecognitionMethodID

smallint

5

No

0

 

InvoiceStyle

smallint

5

No

0

 

WSContractStartDate

datetime

 

Yes

 

Validated

ContractExperationDate

datetime

 

Yes

 

Validated

ForecastOriginalEquipment

numeric

19,5

No

0

 

ForecastOriginalLabor

numeric

19,5

No

0

 

ForecastOriginalMaterial

numeric

19,5

No

0

 

ForecastOriginalOther

numeric

19,5

No

0

 

ForecastOriginalSubs

numeric

19,5

No

0

 

ForecastOrigLabor1

numeric

19,5

No

0

 

ForecastOrigLabor1Hours

int

10

No

0

 

ForecastOrigLabor2

numeric

19,5

No

0

 

ForecastOrigLabor2Hours

int

10

No

0

 

ForecastOrigLabor3

numeric

19,5

No

0

 

ForecastOrigLabor3Hours

int

10

No

0

 

ForecastOrigLabor4

numeric

19,5

No

0

 

ForecastOrigLabor4Hours

int

10

No

0

 

ForecastOrigLabor5

numeric

19,5

No

0

 

ForecastOrigLabor5Hours

int

10

No

0

 

ForecastOrigTotalLabor

numeric

19,5

No

0

 

ForecastOrigTotalLaborHrs

int

10

No

0

 

EstimateEquipment

numeric

19,5

No

0

 

EstimateLabor

numeric

19,5

No

0

 

EstimateMaterial

numeric

19,5

No

0

 

EstimateSubs

numeric

19,5

No

0

 

EstimateOther

numeric

19,5

No

0

 

EstimateTotalCost

numeric

19,5

No

0

 

EstimateHours

int

10

No

0

 

EstimateLabor1

numeric

19,5

No

0

 

EstimateLabor1Hours

int

10

No

0

 

EstimateLabor2

numeric

19,5

No

0

 

EstimateLabor2Hours

int

10

No

0

 

EstimateLabor3

numeric

19,5

No

0

 

EstimateLabor3Hours

int

10

No

0

 

EstimateLabor4

numeric

19,5

No

0

 

EstimateLabor4Hours

int

10

No

0

 

EstimateLabor5

numeric

19,5

No

0

 

EstimateLabor5Hours

int

10

No

0

 

EstimateTotalLabor

numeric

19,5

No

0

 

EstimateTotalLaborHrs

int

10

No

0

 

ForecastLabor

numeric

19,5

No

0

 

ForecastEquipment

numeric

19,5

No

0

 

ForecastMaterial

numeric

19,5

No

0

 

ForecastSubs

numeric

19,5

No

0

 

ForecastOther

numeric

19,5

No

0

 

ForecastTotalCost

numeric

19,5

No

0

 

ForecastHours

int

10

No

0

 

ForecastLabor1

numeric

19,5

No

0

 

ForecastLabor1Hours

int

10

No

0

 

ForecastLabor2

numeric

19,5

No

0

 

ForecastLabor2Hours

int

10

No

0

 

ForecastLabor3

numeric

19,5

No

0

 

ForecastLabor3Hours

int

10

No

0

 

ForecastLabor4

numeric

19,5

No

0

 

ForecastLabor4Hours

int

10

No

0

 

ForecastLabor5

numeric

19,5

No

0

 

ForecastLabor5Hours

int

10

No

0

 

ForecastTotalLabor

numeric

19,5

No

0

 

ForecastTotalLaborHrs

int

10

No

0

 

TaskEstimateRollupGroup

smallint

5

No

0

 

UserDefine1a

char

31

No

 

 

UserDefine2a

char

31

No

 

 

UserDefine3a

char

31

No

 

 

UserDefine4a

char

31

No

 

 

ServiceUserDefine3

char

31

No

 

 

ServiceUserDefine5

int

10

No

0

 

ServiceUserDefine6

int

10

No

0

 

ServiceUserDefine9

datetime

 

No

'1/1/1900'

 

ServiceUserDefine10

datetime

 

No

'1/1/1900'

 

ServiceUserDefine18

tinyint

3

No

0

 

ServiceUserDefine19

tinyint

3

No

0

 

ServiceUserDefine22

numeric

19,5

No

0

 

ServiceUserDefine23

numeric

19,5

No

0

 

ServiceUserDefine24

numeric

19,5

No

0

 

ContractBillingDate

smallint

5

No

1

 

ContractServiceDate

smallint

5

No

1

 

AutoBill

tinyint

3

No

1

 

PurchaseOrder

char

15

No

 

 

Divisions

char

15

Yes

 

Validated

PYLabor

numeric

19,5

No

0

 

PYMaterial

numeric

19,5

No

0

 

PYEquipment

numeric

19,5

No

0

 

PYSubcontractor

numeric

19,5

No

0

 

PYOther

numeric

19,5

No

0

 

PYTotalCost

numeric

19,5

No

0

 

PYBilled

numeric

19,5

No

0

 

PYContractEarned

numeric

19,5

No

0

 

PYGrossProfit

numeric

19,5

No

0

 

PYRevenueRecognized

numeric

19,5

No

0

 

PYHours

int

10

No

0

 

PYLabor1

numeric

19,5

No

0

 

PYLabor1Hours

int

10

No

0

 

PYLabor2

numeric

19,5

No

0

 

PYLabor2Hours

int

10

No

0

 

PYLabor3

numeric

19,5

No

0

 

PYLabor3Hours

int

10

No

0

 

PYLabor4

numeric

19,5

No

0

 

PYLabor4Hours

int

10

No

0

 

PYLabor5

numeric

19,5

No

0

 

PYLabor5Hours

int

10

No

0

 

PYTotalLabor

numeric

19,5

No

0

 

PYTotalLaborHrs

int

10

No

0

 

YTDHours

int

10

No

0

 

YTDLabor1

numeric

19,5

No

0

 

YTDLabor1Hours

int

10

No

0

 

YTDLabor2

numeric

19,5

No

0

 

YTDLabor2Hours

int

10

No

0

 

YTDLabor3

numeric

19,5

No

0

 

YTDLabor3Hours

int

10

No

0

 

YTDLabor4

numeric

19,5

No

0

 

YTDLabor4Hours

int

10

No

0

 

YTDLabor5

numeric

19,5

No

0

 

YTDLabor5Hours

int

10

No

0

 

YTDTotalLabor

numeric

19,5

No

0

 

YTDTotalLaborHrs

int

10

No

0

 

TTDHours

int

10

No

0

 

TTDLabor1

numeric

19,5

No

0

 

TTDLabor1Hours

int

10

No

0

 

TTDLabor2

numeric

19,5

No

0

 

TTDLabor2Hours

int

10

No

0

 

TTDLabor3

numeric

19,5

No

0

 

TTDLabor3Hours

int

10

No

0

 

TTDLabor4

numeric

19,5

No

0

 

TTDLabor4Hours

int

10

No

0

 

TTDLabor5

numeric

19,5

No

0

 

TTDLabor5Hours

int

10

No

0

 

TTDTotalLabor

numeric

19,5

No

0

 

TTDTotalLaborHrs

int

10

No

0

 

AutoDate

datetime

 

No

1/1/1900'

 

CancelBox

tinyint

3

No

0

 

Hold

tinyint

3

No

0

 

ExcessCost

numeric

19,5

No

0

 

UnbilledReceivable

numeric

19,5

No

0

 

ContractNTEUnits

int

10

No

0

 

ContractActualUnits

int

10

No

0

 

EquipmentID

char

31

No

 

Not validated or used by core product

WarrantyCheckbox

tinyint

3

No

0

 

TimeZone

char

3

No

 

 

SVLanguageID

smallint

5

No

0

 

BillingCurrencyID

char

15

No

 

Not validated or used by core product

LocalCurrencyID

char

15

No

 

Not validated or used by core product

HoldReasonID

smallint

5

No

 

Not validated or used by core product

BillingEquipment

numeric

19,5

No

0

 

BillingMaterial

numeric

19,5

No

0

 

BillingLabor

numeric

19,5

No

0

 

BillingSubs

numeric

19,5

No

0

 

BillingOther

numeric

19,5

No

0

 

BillingPercentageEquip

numeric

19,5

No

0

 

BillingPercentageMaterial

numeric

19,5

No

0

 

BillingPercentageLabor

numeric

19,5

No

0

 

BillingPercentageSubs

numeric

19,5

No

0

 

BillingPercentageOther

numeric

19,5

No

0

 

CurrentBillingAmount

numeric

19,5

No

0

 

EscalationFrequency

char

15

No

NONE'

Validated - 'AT ANNIVERSARY' or 'NONE'

EscalationNotificationDays

smallint

5

No

0

 

NextEscalationDate

datetime

 

No

1/1/1900'

 

AnniversaryDate

datetime

 

No

 

Validated - cannot be greater than expiration, if > 365 days will be set to start date + 365, if <= 365 days will be set to expire date

EvergreenContractFlag

tinyint

3

No

0

 

ContractUnitsMeasure

char

15

No

 

 

LastReviewDate

datetime

 

No

1/1/1900'

 

MasterTaxScheduleID

char

15

No

 

Validated - SV000789

ContractInternalName

char

15

No

 

Validated - this is contract type SV00515

AutomaticEscalationFlag

tinyint

3

No

0

 

BillCustomerNumber

char

15

No

 

Validated

BillAddressCode

char

15

No

 

Validated

LeaveOpenFlag

tinyint

3

No

0

Fills field WSReservedCB1 and represents a contract that will be left open when renewed.

WennsoftTablesOnly

tinyint

3

No

0

NA

OnlyValidate

tinyint

3

No

0

NA

USRDEFND1

char

50

No

 

 

USRDEFND2

char

50

No

 

 

USRDEFND3

char

50

No

 

 

USRDEFND4

varchar

8000

No

 

 

USRDEFND5

varchar

8000

No

 

 

ReturnErrorText

tinyint

3

No

0

Option to return error text along with error code

iErrorState

tinyint

3

No

0

Returned error code - output

ErrString

varchar

255

No

 

Returned error string - output

JavaScript errors detected

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

If this problem persists, please contact our support.