Billing Code Stored Procedures

This topic shows the signature for the external touch points stored procedures for material, labor, and miscellaneous transactions that are called when using the Custom billing code.

Custom Material Rate Stored Procedure


	exec @Severity = EXTGEN_CustomMatlRateSp
     @InType
     , @InSroNum
     , @InSroLine
     , @InSroOper
     , @InItem
     , @InCustNum
     , @InQty
     , @InBillCode
     , @UM
     , @Whse
     , @InCost
     , @OutCostConv          OUTPUT
     , @OutUnitPrice         OUTPUT
     , @OutUnitPriceConv     OUTPUT
     , @Infobar              OUTPUT

Custom Post Rate Calculation for Material Stored Procedure


	exec @Severity = EXTGEN_CustomMatlRatePostSp
     @InType
     , @InSroNum
     , @InSroLine
     , @InSroOper
     , @InItem
     , @InCustNum
     , @InQty
     , @InBillCode
     , @UM
     , @Whse
     , @InCost
     , @OutCostConv          OUTPUT
     , @OutUnitPrice         OUTPUT
     , @OutUnitPriceConv     OUTPUT
     , @Infobar              OUTPUT

Custom Labor Rate Stored Procedure


	exec @Severity = EXTGEN_CustLaborRateSp 
	@iTransType,
	@iSroNUm,
	@iSroLine,
	@iSroOper,
	@iBillCode,
	@iTransDate,
	@iPartnerId,
	@iWorkCode,
	@iUnitCost,
	@iHrsWorked,
	@iHrsBilled,
	@tUnitPrice    OUTPUT,
	@Infobar       OUTPUT,
	@CustNum,
	@CustSeq

Custom Miscellaneous Rate Stored Procedure


	exec @Severity = EXTGEN_CustMiscRateSp 
	@iTransType,
	@iSroNum,
	@iSroLine,
	@iSroOper,
	@iBillCode,
	@iTransDate,
	@iPartner,
	@iMiscCode,
	@iUnitCost,
	@iQty,
	@tUnitPrice    OUTPUT,
	@Infobar       OUTPUT

Notes About the Stored Procedures

  • A working knowledge of SQL is strongly recommended before you try to modify the stored procedures.
  • When using the Custom billing code, it is expected that at least one of these touch points is activated.
  • When the custom rate external touch points are activated, the associated transaction's rate calculation is overridden by the custom code.
  • Use the Custom Post Rate Calculation for Material Stored Procedure to modify the rates already selected by the standard calculation for the List billing code.
  • If the Custom billing code option is selected and the stored procedure does not exist, it will run the default logic.
  • To display an error message from the stored procedure, return a non-zero value as well as a error message in @Infobar.
  • Return a 0 from the stored procedure if processing completed successfully.