++++++++++ reportgroupid=1 sp=spRptFaultReportData++++++++++
sql=[sp_helptext "spRptFaultReportData"
]

BatchTypeID: 11

Header                       = Field
[Log Date/Time]              = Var02 (AS LogDatTime)
[Equipment]                  = Var08 (based on data in Transaction)
[Location/Configuration]     = (Var10 == Var05) ? Var10 : Var10 ' ' Var05
[Last Name]                  = Var14 (AS LastName)
[Call Number]                = Var01 (AS CallNumber)
[Total]                      = amountExGST (AS TariffAmount)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=2 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++ reportgroupid=3 sp=spRptLabour++++++++++
sql=[sp_helptext "spRptLabour"
]

BatchTypeID: 200

Header              = Field
[Date]              = Var03[7,2] '/' Var03[5,2] '/' Var03[1,4] (AS LogDatTime)
[Job]               = Var01 (AS CallNumber)
[Reference]         = Var04
[Location/Description] = (Var10 == Var05) ? Var10 : Var10 ' ' Var05 (also Var13)
[Authorisation]     = Var14
[Total]             = amountexGST


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=4 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=5 sp=spRptPurchasing++++++++++
sql=[sp_helptext "spRptPurchasing"
]

BatchTypeID: 36

Header              = Field
[Job]               = Var01 (AS CallNumber
[Contractor]        = Var02 (AS Contractor)
[Location]          = Var10 (AS Location)
[Reference]         = Var04 (AS Reference)
[Work Description]  = Var05 (AS Descr)
[Amount]            = amountexGST


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=6 sp=spRptNotSet++++++++++

BatchTypeID: 29

Report is grouped (and orderd) by sub heading
found in Var11 (Priority)

Header                = Field
[CallNumber]          = Var01
[PO Number]           = Var02
[Log Date Fixed Date] = Var03
[Callsubject2]        = Var04
[configuration]       = Var05
Total                 = amountexGST


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=7 sp=spRptSecurityData++++++++++
sql=[sp_helptext "spRptSecurityData"
]

BatchTypeID: 13

Header                = Field
[Reference]           = Var02
[Location]            = Var03
[Type]                = Var01 ??? not actual datafrom Var01
  from sp TypeCode = Case tElement.ElementCode WHEN 1034 THEN 'POL' Else 'D/U'
[Description]         = ??? tElement.Description or tElement_2.Description
			(see getdetail6 for joins)
[Total]               = amountexGST


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=8 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=9 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=10 sp=spRptTASRentCallsOther++++++++++
sql=[sp_helptext "spRptTASRentCallsOther"
]

BatchTypeID: 1, 2, 7, 197, 141, 193, 199, 347, 415, ...

Rent:  tBatch.RentStartDate   to tBatch.RentEndDate,
Calls: tBatch.CallsStartDate  to tBatch.RentEndDate,

Note:
data is sumarised like getcde6 and reported pretty much
as the old bilmax21 serviceid summary
except Admim has been added to Other in old bilmax21

Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[User]                = tPerson.Person
[Cost Centre Ref.]    = costcentreref

	costcentre = sprintf("%-6.6s %-2.2s %-6.6s %-6.6s %-1.1s",
		 Centre, Activity, Element, Subledger, PayType)
		tCentre.Description AS Centre,
		tActivity.Description AS Activity,
		tElement.ElementCode AS Element,
		tSubledger.Description AS Subledger,
		tServiceID.PayType,

[Rental]         = SUM(amountexGST) tTransactionGroup.Description = 'RENT'
[Calls]          = SUM(amountexGST) tTransactionGroup.Description = 'CALLS'
[Rental]         = SUM(amountexGST) tTransactionGroup.Description = 'OTHER'
[Admin]          = SUM(amountexGST) tTransactionGroup.Description = 'ADMIN'
[Total]          = SUM( tInvoiceReportTransaction.AmountExGST),



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=11 sp=spRptTASCableTotal++++++++++
sql=[sp_helptext "spRptTASCableTotal"
]

BatchTypeID: 359

Header                = Field

(Invoice is Same as the Report for ReportGroupID 10 above)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=12 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=13 sp=spRptNotSet++++++++++

Not in Apr_2010 data

From Robyn....
BatchTypeID: ???

Header                = Field

(Invoice is Same as the Report for ReportGroupID 10 above)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=14 sp=spRptSmartbusFixed++++++++++
sql=[sp_helptext "spRptSmartbusFixed"
]

BatchTypeID: 307

Not in Apr_2010 data ( is in Mar for fro Shipto tp DDS)


Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[Application]         = tApplication.Description
[Speed]               = tServiceType.Description
[PA Renatl]           = tRate.Cost
[Mnthly Rental]       = SUM(amountexGST) for each ServiceID

This needs to come from getcde6 query


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=15 sp=spRptSmartbusGPRSMobile++++++++++
sql=[sp_helptext "spRptSmartbusGPRSMobile"
]

BatchTypeID: 490, 308, 304

Not in Apr_2010 data for VRT VLP (only DDS)

Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[Application]         = tApplication.Description
[Usage (kB)           = SUM(INT(Var01))  for each ServiceID
[Total]               = SUM(amountexGST)      ditto

Needs to come from getcde6 query


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=16 sp=spRptKamcoFixed++++++++++
sql=[sp_helptext "spRptKamcoFixed"
]

BatchTypeID: 309

Apr_2010 data has no Invoices, only (VICTRACK;VRT999999;33816)

Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[Application]         = tApplication.Description
[Speed]               = tServiceType.Description
[PA Renatl]           = tRate.Cost
[Mnthly Rental]       = SUM(amountexGST) for each ServiceID
[Availability]        = ???? Var02 ????


Needs to come from getcde6 query


SELECT
    	tInvoiceReportTransaction.BatchID,
	tInvoiceDetail.Description As InvDetailDesc,
	tServiceID.ServiceID,
 	tLocation.Description as Location,
	tApplication.Description As ApplicationDesc,
	tServiceType.Description As Speed,
	/*PARental = SUM(CONVERT(numeric(16,2),tRate.Description)),*/
	PARental = tRate.Cost,
	Total = SUM( tInvoiceReportTransaction.AmountExGST),
	tBatch.RentStartDate,
	tBatch.RentEndDate,
	tBatchType.SupplierDisplayedName,
	Var01,
	Var02


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=17 sp=spRptNotSet++++++++++

Not in Apr_2010 data


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=18 sp=spRptYarraGPRSMobile++++++++++
sql=[sp_helptext "spRptYarraGPRSMobile"
]

BatchTypeID: 348

Apr_2010 data has no Invoices, only (VICTRACK;VRT999999;33576)
m
this is YARRA CAMS KDR


Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[Application]         = tApplication.Description
[Usage (kB)           = SUM(INT(Var01))  for each ServiceID



Needs to come from getcde6 query


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++ reportgroupid=19 sp=spRptAggregateSmartbusGPRSMobile++++++++++
sql=[sp_helptext "spRptAggregateSmartbusGPRSMobile"
]

BatchTypeID: 461

Not in Apr_2010 data for VRT or VLP (Only KAM)

Header                = Field
[ServiceID]           = tServiceID.ServiceID
[Location]            = tLocation.Description
[Application]         = tApplication.Description
[Access Charge]       = SUM(amountexGST) foe TransactionGroup.DESC == "RENT"
[Usage]               = ????SUM(INT(Var01))  ????
[Excess Charge]       = ????


SELECT
    	tInvoiceReportTransaction.BatchID,
	tInvoiceDetail.Description As InvDetailDesc,
	tServiceID.ServiceID,
 	tLocation.Description as Location,
	tApplication.Description As ApplicationDesc,
	Usage = SUM(CONVERT(int,tInvoiceReportTransaction.Var01)),
	RentalAmountExGST = SUM(CASE tTransactionType.TransactionGroupID WHEN 1 THEN tInvoiceReportTransaction.AmountExGST ELSE 0 END),
	CallAmountExGST =   SUM(CASE tTransactionType.TransactionGroupID WHEN 2 THEN tInvoiceReportTransaction.AmountExGST ELSE 0 END),
	tBatch.CallsStartDate,
	tBatch.CallsEndDate,
	tBatch.RequisitionNumber,
	tBatch.OrderNumber,
	tBatch.TotalCredits,
	tBatch.TotalRevenue,
	tBatch.InvoiceNo,
	tBatchType.SupplierDisplayedName

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++