Uploaded image for project: 'mod-invoice'
  1. mod-invoice
  2. MODINVOICE-105

Prorated Adjustments - prorating percentage adjustments

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 93
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      Overview

      The way in which we prorate percentage adjustments is different from what was actually implemented. This was at least in part due to vague or confusing documentation, which has been updated on the wiki

      In short, we first evaluate the percentage to an amount and prorate the amount like a regular amount-based prorated adjustment.

      Given: An invoice has 3 lines:

      • $10
      • $20
      • $30
      • invoice.subTotal = $60
      • invoice adjustment of 10% prorated by line (in addition to total)

      Each line get an adjustment of $2.00 ($6 / 3 lines)

      • $10 + ($2) = $12
      • $20 + ($2) = $22
      • $30 + ($2) = $32
      • invoice.adjustmentTotal = $6.00

      The same technique is used for prorating "By amount" and "By quantity"

      NOTE: This means the invoice adjustments will have type "percentage" but corresponding invoiceLine adjustments will have type "amount".

      Acceptance Criteria

      • Prorating percentage adjustments is handled as described above.
      • unit tests are updated
      • API tests are updated

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                yauheni_kuzmianok Yauheni Kuzmianok
                Reporter:
                cmcnally Craig McNally
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases