Trying to configure tryton for UK accounts

Excellent news and thank you.

Downloading the rates would be great rather than having to manually enter them at any point; hard coded or otherwise.

I am making steady progress, and have been doing quite a bit of learning and research. I have some notes, and questions.

I fully agree that the exchange rates should not be included in a uk accounts module.

The Abbreviated Accounts format has been abolished with changes in 2015 to uk law and can no longer be used when filing accounts.

Looking at the accounting_uk module README by lampmantech, he correctly points out that in the UK there could be many different legal charts of account. Each of these made for a different business sector (service, manufacturing, etc), and/or type of company (sole trader, partnership, limited company, etc).

Based on this I am wondering what is the best way of structuring the account_uk module? I can see a few alternatives:

  • A single account_uk module that includes everything for as many types of company and business as possible.

    I don’t think this is a great solution because it will mean that companies have accounts and reports that they will then have to ignore or deactivate, and is not in keeping with the modular approach of the rest of Tryton.

  • Many different account_uk_* modules, each of which would contain the chart of accounts, data, reports and code for a specific business sector and company type.

    I don’t think this is a good idea because with separate charts of account for each sector and company type, things like common accounts would then have to be duplicated in each module. Also with separate charts of account I don’t think there will be much that could be shared between these modules, as I think taxes for example, are be linked to an account.account.template.

  • An account_uk module that contains any common reports, taxes and a basic chart of accounts, and then additional modules that add additional accounts and reports that are specific to the company type or business sector.

    The idea is that multiple account_uk_* modules would then be installed to provide the appropriate functionality. e.g. a UK limited company that provides services and also does some manufacturing could then install the account_uk, account_uk_limited_company, account_uk_service, and account_uk_manufacturing modules.

    This is my preferred option. One disadvantage may be for multiple company setups, from what I can see they would end up with the same type of charts of account for each company, even when each company may ideally have a different setup.

I welcome any feedback or comments.

To be able to advise, we should know what are the differences between those charts.
Do they have incompatible accounts like two account with the same code but different purpose? If no, for me, there should be only one chart of account with everything strictly needed.
We have an example with Spain where there are two charts (for small and large business) which are incompatible together because the some accounts with the same code do not have the same purpose. But this is a solution that should be avoid if possible because it is more complex.
I do not see any problem to have more complete chart for a company with accounts that it does not use.

I do not understand who reports could be different. The general legder, balance sheet, income statement etc. should not be that different and neither the tax reporting. Could you point what are the differences?

Speaking for me personally, I am utilising the micro accounts discussed here for a services company, so I like the last option you mention ->

That said, I don’t fully know the differences between full accounts and micro/small.so its hard to comment more than that.

I am guessing after seeing previous company corp accounts its the level of detail required and the need to be audited.

I am not aware (but may be wrong) of differences between service lines, as isn’t it about the overall profit and loss + balance sheet, which might have different revenue/income lines but they are all still income.

I would be fine with one account that can have items removed if it is a micro or small business, but I’d really appreciate knowing that these type of options are available, so I don’t get swamped with detail of a full company account that I do not need to know at that point.

For non limited companies I guess it is again down to the differences, but I understood it is differences in tax bands and the classes of national insurance that are applicable. As well as different reporting requirements but they are not financial.

Thanks for the feedback.

There is no official chart of accounts defined, so it is possible to create a chart of accounts that does not have duplicated codes.

From what I can see, the differences in the balance sheet and income statement for Small Companies and Groups, and Large and Medium-sized Companies are only in the arabic numbered items, and furthermore general rule 4 states that these numbered items should be adapted where the nature of the business requires it. Also, it looks like small companies could use the the formats defined for large and medium-sized companies - See 3. (3). So I see no obstacle for having a single module here.

However, for Banking Companies, and Insurance Companies, the allowed formats for the balance sheet and income statement are quite different.

If there was a single module then it is possible to deactivate items that you are not interested in. Accounts and account types can be updated to have an end date sometime in the past, this would then mean you would not see them. Then if in the future you needed them, you could re-activate them.

I would be great to get an idea of what kinds of revenue/income lines you would be expecting to see for a service company, so I can compare it with what I have found out so far.

To summarize there are 4 types: small, large and medium, banking and insurance companies.
So I seems that 4 charts of account are required (but banking and insurance could probably be skipped for now). And as small can use the large and medium, I think the best is to implement the last one.

There are also sole traders and partnerships, but these do not have to file accounts with a public body, only maintain proper accounting records. They could also use the same chart of accounts and format of balance sheet and income statement.

So, I agree its probably best to base the module on the Large and Medium-sized company formats.

1 Like

Sure, but it may be some time.

Those service lines would depend on the service being offered wouldn’t they. Perhaps Service 1,2, 3 etc

There would also be the addition of partial payments as its unlikely you would be paid for all of the service in advance and you would want payment on milestones to ease your cashflow for example.

I have a question that I hope someone can help me with.

On the balance sheet formats there are several “payments on account” items. From what I understand a payment on account is a payment where there is no invoice to allocate it to. This payment is then allocated to an invoice at a later date.

In Tryton I expected payments without an invoice would be posted to the appropriate payables or receivables account, and then at a later date simply reconciled using the Reconcile Accounts wizard? If this is the case then on the balance sheet these payments would show up as part of the amount from that payables or receivables account.

So how should these payments on account be split out? Is it best to have some “payment on account” accounts, which any outstanding payments on account can be moved to at year/period end, and then moved back at the next year/period start?

I would say do not use those accounts if it is not strictly required.
Tryton manages payable and receivable through reconciliation which is a much more powerful way.

I’ve now got an initial module that can be tested. It includes a chart of accounts, balance sheet and income statement. It also includes UK taxes.

There are some things that I have not included (yet) such as reports to output the balance sheet and income statement in an appropriate format for filing, or a model to show the data that must go in each of the boxes on the VAT Return, or any support for MTDfVAT.

However I have created issue7770 so I can hopefully get some feedback before I do too much more.

Congrats on getting to this point. It sounds very promising.

Is it at a point to have a try and if so what is the best way of installing?

Thanks

You should download the proposed review and install the module from sources. Something like:

mkdir account_uk
cd account_uk
hg init . 
hg import https://codereview.tryton.org/download/issue51551002_20001.diff
python setup.py install

Note that you need to have mercurial installed in order to execute the hg commands.

Hope it helps

Yes, it is definately at a point where it can be tested. There are a few different ways of installing it, but Sergi’s suggested method works well (although you might want to also run cd account_uk, just after the mkdir account_uk line :slight_smile: ).

It would be good to get any comments, suggestions, or questions about it, so I can improve it as required.

Yes it does help thank you.

I am only using your official docker image, so I am hoping it has the necessary deps for me to do it?

Edit: Just checked and mercurial is not installed, so i will look for the Dockerfile so I can add the deps to a test docker.

Thanks for the additional input :slight_smile: I will give it a try.

I have submitted my accounts with Freeagent this time, but I am keen to see if the calcs all come out the same with this too.

The review is not present on the oficial Docker image, so you need to build one derivate image installing it.

Indeed if you don’t want to install some packages on the Trytond image you should use the root user and pip3 to install it on python3 (as the default python is python2)

Here is some example:

FROM tryton/tryton
USER root
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    mercurial \
  && rm -rf /var/lib/apt/lists/*
# Install module
RUN mkdir account_uk && cd account_uk
RUN hg init .  && hg import https://codereview.tryton.org/download/issue51551002_20001.diff
RUN pip3 install --process-dependency-links . \
  && rm -rf /root/.cache
# Use trytond user
USER trytond
1 Like

Thanks @pokoli very helpful.

So I managed to install the uk accounts manually inside of a running docker image but I cannot get a docker image to build with the above additions.

I’ve tried various options and they all result in a continuously ‘building’ docker that never errors out or stops, which I have never seen before.

At what point could the changes be incorporated into a module that can be loaded normally into the system?

Can it be noted as a beta or whatever the usual process is in these instances…thanks in advance

Hi,

I think the Dockerfile from @pokoli might be trying to install the development version (5.1) of trytond as well as the account_uk module on the RUN pip3 ... line. It is probably just taking ages to try and do that.

Try this Dockerfile to see if this is any better:

FROM tryton/tryton
USER root

# Install the patch command
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    patch \
  && rm -rf /var/lib/apt/lists/*

# Manually install the account_uk module
ARG MODULE_PATH=/usr/local/lib/python3.5/dist-packages/trytond/modules
RUN mkdir $MODULE_PATH/account_uk \
  && cd $MODULE_PATH/account_uk \
  && curl https://codereview.tryton.org/download/issue51551002_40001.diff \
  | patch -p1

USER trytond