Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9492

Tax Authorities need two GL accounts for sales and purchases

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: accounting
    • Labels:

      Description

      In jurisdictions with Value Added Tax, you need to track tax you have paid on purchases, and tax you have collected with sales. When you report to a tax authority, you pay them the difference between the two, i.e. you pay tax on the value added, not on your inputs.

      OFBiz has an entity, TaxAuthorityGlAccount (TAGLA), which currently assumes the GL account is for a sale.

      We need to extend OFBiz so it is possible to find two GL accounts for a tax authority, one for sales and one for purchases.

      I propose:

      • add new attributes to the TaxAuthorityGlAccount entity: acctgTransTypeId (one of SALES_INVOICE, PURCHASE_INVOICE and CUST_RTN_INVOICE) and taxAuthorityRateTypeId (values might be for example VAT_TAX, GST). The new attributes should be included in the primary key.
      • Add a new service in TaxAuthorityServices named getTaxAuthorityGlAccountId which
        looks up a TAGLA given primary key values, including the transaction type
      • There are two places in TaxAuthorityServices that would call getTaxAuthorityGlAccountId: getTaxAdjustments and getItemTaxAdjustments, one for orders, and the other for invoice item types. The transaction type can be inferred from the order type or the invoice item type
      • createAcctgTransForPurchaseInvoice and createAcctgTransForCustomerReturnInvoice
        should use getTaxAuthorityGlAccountId
      • createAcctgTransactionForSalesInvoice should be rewritten to use getTaxAuthorityGlAccountId.

      I am working on a patch to do this, but I'd like your thoughts on my proposal

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulfoxworthy Paul Foxworthy
                Reporter:
                paulfoxworthy Paul Foxworthy
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: