Yes. it looks like it should I guess It’s working in the one demo company that I set up.
Another question, any idea how to achieve date calculation? I was following liquid documentation, but cannot get the wanted date. I want to be able to calculate the due date for submission of the report which is 25 days after the report.To date.
Sorry I didn’t look closely enough.
Your code looks fine.
Tried myself and very limited date: filters work. (no month print out but “now” does work)
Perhaps date: time zone and language need to be set in Manger localisation.
Thinking about it, I suspect lubos is already aware the date: filter is non standard. That would explain why financial year period as well as report period is separately entered in all localisation. Liquid date: filter appears to not support languages other than English, so Lubos may have a custom modification to circumvent this limitation.
Probably should look to see what date localisation data is stored in the “business” variable.
Aha! This is because Manager is not using liquid, but dotliquid, (because, presumably, this must be done when programming in C#, or maybe it is using liquid with the .NET fromating strings??). Anyway, the time format strings are defined differently
When using the date filter, DotLiquid supports both Ruby and .NET date format strings (but not both at the same time). By default, it will use .NET date format strings. This can be changed by setting a configuration property:
Tut, try reading the thread again. More than 90% is Manager specific not general programming information. The forum is for an exchange of ideas to maximise the use and value of Manager. Without Manager specific information in a central place how do you plan to get the 1-4 localisation for 100-200 countries written. The hard part about doing that is a good understanding of local tax laws now an easy to use tool has been built by Lubos. Because of the required local tax knowledge, Manager localisation are best written by local accountants, hence the format of this thread.
I appreciate there a users and moderators more familiar with accounting than Manager customisation. And while all users need to customise Manager, some will never need to use the more advanced customisation features. If the forum traffic for advanced customisation becomes excessive, perhaps a sub forum would be required but I would be surprised if that happened
@Patch, my comment was only meant as a joke. The upside-down smiley face was used to show how I feel reading it. No criticism was intended. I apologize if it was taken that way.
As a result of this post it is probably best to not put too much effort into localisation at the moment. I assume the future implementation will enable a larger range of use cases to be addressed and hopefully maintains relative ease of implementation for those with a good understanding of local tax requirements such as local accountants.
The liquid error is saying your code is trying to use a null (none existent thing) as an index to access a specific element in a data array.
The easiest way to find out how this could be happening is to print out the internal / intermediate values given your current Manager business. See the post above on debugging such as
More options are shown in that post or the Business information access post
Printing out some of the intermediate values may also help such as used in the code you added
A mistake in copying or changed UUID could produce this error
Thank you I have now found it by using your above suggestion @Patch My NZ GST return is now all correct. and I got the new tax code to work where when you load it into a business for the first time it creates the new tax code
I sure wish we could do this with payslips so we could design our own with custom fields and do adding etc. want to add quantity with a custom field. The layout is all good just want to do a bit more with it
I agree calculations in payslips would be good but that will have to be done differently as it involves writing back to Managers database not just customising the displayed results.