Order.Properties.Taxes.BuyerTax.Amount

Discussions related to ReadyDoc development.
Post Reply
B_Hinote
Posts: 34
Joined: Tue Jan 08, 2019 7:20 pm

Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote » Fri Apr 12, 2019 2:49 pm

So I am trying to pull values from the City/Town Taxes, County Taxes, Assessments, and Additional Taxes Screen but I cannot seem to identify what Field or method I must use to limit my results down to just the values from each screen.

It appears that All values for these screens are stuffed under the First Property Record Only instead of being placed under a separate collection at the Order Level, however when I access {{Order.Properties[1].Taxes.BuyerTax.Amount}} I am not finding any way to limit this to just the Assessments or Additional Taxes Screen Results. Hardcoding {{Order.Properties[1].Taxes[1].BuyerTax.Amount}} will give me the results from the City/Town Taxes Screen, but this is definitely not a good coding practice in my book.

There has got to be a way to specify {{Order.Properties[1].Taxes[Assessments].BuyerTax.Amount}} or ...Taxes{Assessments}.BuyerTax.Amount to retrieve values from each of the screens, but for some reason, I am not seeing it.

I would appreciate help with this.

Thank you

B_Hinote
Posts: 34
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote » Mon Apr 15, 2019 5:24 pm

Additional Information: I do not see a way to add on to my original post, so I am adding it via a Reply.

I have been told that the only way to reference each of the tax screens is to use a hardcoded index value of Order.Properties[1].Taxes[1] for City Taxes, [2] is for County Taxes, [3] is for Assessments and from [4] on for Additional Taxes. However, Additional Taxes can have any number of records and there is no guarantee that records 1 - 3 for the other tax types will always exist.

With that said, if there is no way to identify or limit the Taxes collection down to just the Additional Taxes using a Type Field, how do I Identify the Record/Index Number so I can loop through the Taxes and only gather the records that are from the Additional Taxes Screen? (i.e. Index 4 and greater.) With no limit on the number of records and the fact that 1 - 3 may not always exist, there should be a way to identify which records are from the Additional Taxes Screen, without having the hardcode a fixed number of records index by index.

Example:
<var $Total (0.00)>
<foreach {{Order.Properties[1].Taxes}}>
<if ({{.IndexField}} > 3)> // Any index greater than 3 woudl be from Additional Taxes
<var $Total ({{$Total}} + {{.BuyerTax.Amount}})>
</if>
</foreach>
Buyer Tax Total is ${{Total}}

Thank you,

B_Hinote
Posts: 34
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote » Wed Apr 17, 2019 12:01 am

Although I do not agree with equating a specific index value with a specific Tax Screen, it appears that I was wrong when I thought the 1st three records were not being assigned to the Taxes Collection, if they did not have a user assigned value added to the screen.

I have now confirmed that they are always added, which means that I can define an index variable and use this to determine the record that was read when looping through the Taxes Collection. Anything 4 and above would be considered from the Additional Taxes Screen.

This issue is resolved.

BobRichards
Posts: 792
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by BobRichards » Wed Apr 17, 2019 10:37 am

I'm glad you found a solution. For others that wander across this thread, a documents developer passed along this information. Hope it helps in the future.

There has got to be a way to specify {{Order.Properties[1].Taxes[Assessments].BuyerTax.Amount}} or ...Taxes{Assessments}.BuyerTax.Amount to retrieve values from each of the screens, but for some reason, I am not seeing it.

The following filter can be applied to the Taxes collection:

Code: Select all

{{Order.Properties.Taxes[{{.Description}}="Assessments"].BuyerTax.Amount}}
...how do I Identify the Record/Index Number so I can loop through the Taxes and only gather the records that are from the Additional Taxes Screen?

The ".Self" field code can be utilized here -- but, since its value is not a string, it CANNOT be used as a filter (as above). I have rewritten your code to include the IF statement utilizing the ".Self" node:

Code: Select all

<VAR $Total (0.00)>
<FOREACH {{Order.Properties[1].Taxes}}>
<IF ({{.Self}}="Additional Tax")>
<VAR $Total ({{$Total}} + {{.BuyerTax.Amount}})>
</IF>
</FOREACH>
Buyer Additional Tax Total is ${{Total}}
Bob Richards, Software Developer, SoftPro

B_Hinote
Posts: 34
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote » Wed Apr 17, 2019 5:23 pm

Great Information. I believe the use of {{.Self}} is the Magic Field I was looking for.

It is too bad that we cannot use {{.Self}} as a filter when directly accessing values from the City Taxes, County Taxes, and Assessments Screens, as the Description can be changed by the user. In this case, I would probably just use the designated index values to ensure I do not miss a value when the description gets changed.

Code: Select all

{{Order.Properties[1].Taxes[3].BuyerTax.Amount}}
Using the ".Self" node to loop through ".Taxes" and identify which records were from the Additional Tax Screen is exactly what I needed, but because ".Self" returns "Additional Tax (UserDescription)" I would probably use instring() to limit the results.

Code: Select all

<VAR $Total (0.00)>
<FOREACH {{Order.Properties[1].Taxes}}>
<IF (instring({{.Self}}, "Additional Tax")>-1)>
<VAR $Total ({{$Total}} + {{.BuyerTax.Amount}})>
</IF>
</FOREACH>
Buyer Additional Tax Total is ${{$Total}} 
Thank you for the information provided.

RebeccahCTAC
Posts: 3
Joined: Sat Apr 27, 2019 3:14 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by RebeccahCTAC » Mon Oct 28, 2019 1:48 pm

I have a problem that is in the same ballpark as this thread. Unfortunately, I'm not able to solve it with the information posted previously. :? I looked for a formula editing forum but didn't see one. I figured the readydoc forum is the 2nd best place to ask!

For context:
We are in the time of year that we are collecting for all of 2019 at closing. We are changing the Tax Payment Status in the County/Parish tax screen to "Pay Total Tax". We recently had an agent go nuclear because the seller CD only shows the amount that the seller is responsible for and the time period is set to 01/01/2019-01/01/2020. For example, 2019's total tax collected at closing is $1,868.25 and we are collecting $174.03 from the buyer and $1,694.22 from the seller. On the seller's CD, this is what it looks like:

F.04 Property Taxes ( mo.) to East Baton Rouge Parish 01/01/19-01/01/20 $1,694.22

The agent couldn't understand that we were not actually collecting the entire year from the seller. She was such a crazyhead that I've been tasked to find a solution.
Optimally, I'd like to put in an F2 formula that will replace the out-of-the-box date range of 01/01/19-01/01/20 with just the seller's portion of the year (since we do not prepare the buyer's CD, I'm only concerned with the seller's portion). When I couldn't get the F2 formula to work, I tried using it in a document. The code wouldn't work there either. What am I missing?

Code: Select all

{{Order.Properties.Taxes[{{.Description}}="Parish Taxes"].SellerTax.PeriodFrom}} - {{Order.Properties.Taxes[{{.Description}}="Parish Taxes"].SellerTax.PeriodTo}}

BobRichards
Posts: 792
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by BobRichards » Wed Oct 30, 2019 10:21 am

I reached out to another developer and they had additional questions about your scenario:

1) What is an F2 Formula? It simply resets the field to the default state.
2) What is the settlement date for the proposed scenario below?
3) Where will the desired formula "result" appear? On a document? Within the order?
Bob Richards, Software Developer, SoftPro

Post Reply