Code Monkey home page Code Monkey logo

Comments (3)

peterpicard avatar peterpicard commented on May 30, 2024

Hi @eprbell, Australia's tax year is from 1st July to 30th June. I don't see any way to change the default behaviour of report generation (1st January to 31st December) through the exposed class methods. Any suggestions?

from rp2.

macanudo527 avatar macanudo527 commented on May 30, 2024

There is nothing blocking you from sorting the data into years based on that calendar. RP2 gives you all the data by default and you can then sort that however you want. For example, in the tax report for Japan I sorted tax years like this:

# Sort all in and out transactions by year, the fee from intra transactions must be reported
for entry in chain(in_transaction_set, out_transaction_set, intra_transaction_set):  # type: ignore
  transaction: AbstractTransaction = cast(AbstractTransaction, entry)
  years_2_transaction_sets.setdefault(transaction.timestamp.year, []).append(entry)

I just used the timestamp year, but you could easily change that to filter the data however you want.

from rp2.

eprbell avatar eprbell commented on May 30, 2024

What @macanudo527 is correct. I'll only add a couple of details:

  1. there is one class in RP2 that computes yearly summaries (YearlyGainLoss). It has hard-coded year start at Jan 1st. However the generator plugins for Australia (or another country) can simply ignore it (and compute its own summaries, if needed, or no summaries).
  2. tax year begin date could become a new method of country plugins
  3. YearlyGainLoss could use the new tax year begin date method to adjust its computation.

Point 1 is available today. Points 2 and 3 could be done as an enhancement.

from rp2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.