Core.NETCore.BI-Examples
Z Podpora.nextis.cz
Calculate purchase turnover for suppliers
'Total moth count to calculate turnover
Dim TotalMonths As Integer = 12
'Calculate turnover info for each month
For MonthCurrent As Integer = 0 To TotalMonths - 1
Dim Year As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Year
Dim Month As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Month
'1. Declare base BI calculation class
Dim MonthInfo As New Core.NETCore.BI.CompanyBussinesInfo(Year, Month, Core.NETCore.BI.CompanyBussinesInfo.TurnoverTypes.GoodsByIssue)
'2. Declare collection with supplier turnover info
Dim Results As System.Collections.Generic.SortedList(Of Integer, Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo)
'3. Calculate supplier turnover info using base BI class (step 1.)
' FilteredInSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
' FilteredOutSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
Results = MonthInfo.SupplierTurnover("", "")
'4. Browse and show data for each supplier info in specified month
For Each Item As Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo In Results.Values
'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
'Place your code to show data, stored in [Item]
'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Next
Next