"... you mean these fans?" Posted September 8, 2018 Posted September 8, 2018 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.
Steve Martino Posted September 8, 2018 Posted September 8, 2018 If you had a relationship or portal sorted by invoice date, 1 one row portal would only show the first invoice for each customer.
"... you mean these fans?" Posted September 8, 2018 Author Posted September 8, 2018 (edited) 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 September 8, 2018 by Mr. Ignoramus
bcooney Posted September 8, 2018 Posted September 8, 2018 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.
Recommended Posts
This topic is 2286 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 accountSign in
Already have an account? Sign in here.
Sign In Now