Order.Properties.Taxes.BuyerTax.Amount

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

Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote »

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: 57
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote »

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: 57
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote »

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: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by BobRichards »

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, Senior Software Developer, SoftPro
B_Hinote
Posts: 57
Joined: Tue Jan 08, 2019 7:20 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by B_Hinote »

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 »

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: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by BobRichards »

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, Senior Software Developer, SoftPro
bandorganman
Posts: 68
Joined: Tue Mar 03, 2020 5:23 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by bandorganman »

Hi, I am working on this now for my client. Shouldn't the index into the taxes start at [0]? That would make it [0] for city / town, [1] for county and [2]for assessments. If i am missing something? I am coding in C#.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by BobRichards »

Many languages over time have differed on what the index is of the first index. In ReadyDoc coding, it starts with 1.

In C# - it doesn't matter because you asked a question in the "ReadyDoc Development" forum. :D
Bob Richards, Senior Software Developer, SoftPro
bandorganman
Posts: 68
Joined: Tue Mar 03, 2020 5:23 pm

Re: Order.Properties.Taxes.BuyerTax.Amount

Post by bandorganman »

Thanks, Bob, I was wondering what that strange looking language was! I did not realize there were different forums. Now I know.
Post Reply