Jump to content

Calculate to 1, 1st Invoice


This topic is 2050 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I have a customer who would like to pay a commission on the 1st invoice by customer id but on all other invoices by customer id he does not want to pay a commission.

I can build the relationship to show the invoices ... but since the invoice have been in play for some time now, the 1st invoice has already happened and I see many invoice by customer id; January, February, March etc ...

Is there a way to write a calculation that would place a "1" in a field for the 1st invoice by a customer Id and in all other invoices by customer id place a "0", is this possibel ?

This would allow me to build the relationship  to the "1" and only see "1st" invoices regardless of when they were entered.

Link to comment
Share on other sites

I have to look across all invoices for person "A".  A one row portal would restrict all other customers except for the 1st one.

I need to see all 1st invoices from all customers assigned to person "A".

Any assistance here i would be grateful.

Thank you.

I could loop through all invoices and assign a "1" to the 1st invoice but I was hoping that there was a calcualation that would enter this "1" automatically simillar to the "cfraction" calc by Comment and later suggested by Phil in related post for a "number value of 1" in subsummaries.

Again, any assistance here I would be grateful.

Thank you.

Edited by Mr. Ignoramus
Link to comment
Share on other sites

It seems to me that you'll need a table that records customer Id, salesperson Id and invoice Id. That table can also capture commission data: amount due, date paid, etc. . . Call it commissions.

If a customer doesn't have a related record in this table, then a commission is due his assigned salesperson if there is also a related invoice. So, I'd have a process that creates a record in the commission table. start by looping through customers that don't have a related record in the commission table. For performance, I'd store the related commission Id in the Customer record. Now you can find all customers that have an empty commission Id and that's the set to loop. 

Link to comment
Share on other sites

This topic is 2050 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.