rutledgek / Rock-Plugins

1 stars 1 forks source link

Missing GL Codes #3

Open JRichmond27 opened 4 years ago

JRichmond27 commented 4 years ago

I just updated the Transnational Batches plugin to v2.01, and now when we click on "Download Batches", the resulting list of batches on the page does not include any GL Codes for our accounts. I'm running Rock v9.4.

I checked the database, and the GL Codes do exist in the FinancialAccounts table in our database. The Transnational block is just not pulling them.

I also tried editing the TransnationalTransactionReconciliationDisplay.lava file to see what might be happening. On line 69 of that file, the value for {{ account.GlCode }} is always empty. As best as I can tell, whatever is feeding the lava file with the Batches object array is what is failing to populate the GlCode values.

I inserted my own code into the lava file to get the FinancialAccount based on account.AccountId, and was able to display the GL Codes correctly. So for anyone else looking for a temporary workaround, just change lines 68 & 69 from this:

    <tr>
        <td style="text-align:left;">{{ account.GlCode }}</td>

...to this:

        {%- financialaccount id:'{{ account.AccountId }}' limit:1 -%}
            {%- assign GLCode = financialaccount.GlCode -%}
        {%- endfinancialaccount -%}
    <tr>
        <td style="text-align:left;">{{ GLCode }}</td>

Plugin Version: 2.01 Rock Version: 9.4

JRichmond27 commented 4 years ago

I found the ascx file for this plugin, and it looks like the for loop at line 252 might be missing an assignment to newAccount.GlCode. All of the other `newAccount' parameters are being set except for that one, so maybe an easy fix?