Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

Spread Income

Hi guys

i have a request from a customers who whats to spead income according to fixed rules

for each customer i get invoice number , date , sales amount and numbers of months to speard

each invoice can get different no of months .

those sales as service contracts , so  in finance report , the CFO need to spread the income

for the life of the contracts .

enclosed  is a file  where the yellow colour is the data i get

and green is the data i need to create

the file is a sample , the real file is very big

thanks

gidon

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use below script

================================

Temp:

Load *, Months as TotalMonths Inline

[

  Customer, Date, Invoice, Sales, Months

  200, 01/02/2014, I100, 5000, 5

  210, 01/04/2014, I150, 7200, 6

];

NoConcatenate

Data:

Load

  Customer,

  Date(AddMonths(Date,(IterNo()-1))) as Date,

  Invoice & '-' & (IterNo()) as Invoice,

  Sales/TotalMonths as Sales,

  Months

Resident Temp

While IterNo() <= Months;

Drop Table Temp;

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Use below script

================================

Temp:

Load *, Months as TotalMonths Inline

[

  Customer, Date, Invoice, Sales, Months

  200, 01/02/2014, I100, 5000, 5

  210, 01/04/2014, I150, 7200, 6

];

NoConcatenate

Data:

Load

  Customer,

  Date(AddMonths(Date,(IterNo()-1))) as Date,

  Invoice & '-' & (IterNo()) as Invoice,

  Sales/TotalMonths as Sales,

  Months

Resident Temp

While IterNo() <= Months;

Drop Table Temp;

gidon500
Creator II
Creator II
Author

hello

thanks for your help

gidon