September 8, 20187 yr 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.
September 8, 20187 yr If you had a relationship or portal sorted by invoice date, 1 one row portal would only show the first invoice for each customer.
September 8, 20187 yr Author 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, 20187 yr by Mr. Ignoramus
September 8, 20187 yr 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.
Create an account or sign in to comment