Comment 1 for bug 985909

Revision history for this message
Michael Nelson (michael.nelson) wrote :

So currently the report that sca imports each day (currently for vat data to calculate earnings) is generated on a daily cron running:

https://pastebin.canonical.com/64827/

Note: It's using the --field=captured option, which means that:
    a) we get a report for all the items which were captured (rather than settled [1]) during the previous day only,
    b) the data won't include the merchant fees or refunds (as these are part of the backend data received after settlement [2]

So, if we also want to import refunds and merchant costs, we'd need to either:
 * do a separate run of vat_report for sca daily on pay using the default settled field so we get the backend data (with refunds and merchant costs), or
 * update the current job to just report on the default settled field, which may mean that the data is not as current as finance need it? (where did the reason come from for needing --field=captured?)

Personally, I think second option is more sound is the better option, as we can just be importing one file with all the data we need, but the delay in online reports may not be an option. Other ideas?

[1] Apparently a payment can be settled between 3-5 days after it is captured for RBS, but it then has other information available, such as merchant fees.
[2] https://bazaar.launchpad.net/~canonical-isd-hackers/canonical-payment-service/trunk/view/head:/src/paymentservice/jobs/monthly/vat_report.py#L117