question

Dan avatar image
Dan asked David Marginian Deactivated commented

isVat = true merchant has no VAT reported for programmatic SDK orders

Is there a flag of some kind that needs to be set on a programmatic order for VAT to be correctly summarized on this screen?



Here I have sold 4 identical items each in their own order @ €6.49, where isVat = true and a default Irish tax rate of 23% has been applied. 1 item was sold through the Register and correctly displays the VAT for that order. The other 3 were created programmatically using similar to the doc

  • OrderConnector#createOrder(new Order())
  • OrderConnector#addFixedPriceLineItem(order.getId(), item.getId(), null, null);
  • And then the order was paid for via ACTION_SECURE_PAY

All 4 receipts have correct amounts and show the VAT:

Transactions -> Payments also show no VAT for the 3 programmatic transactions.




OrdersClover Android SDKTaxes
1582207477726.png (57.3 KiB)
1582208042203.png (8.8 KiB)
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dan avatar image Dan commented ·

Any ideas on this? We have a pretty cranky merchant and I'm not sure if this is my fault or not. Will I create an MVP sample?

0 Likes 0 ·

1 Answer

·
Dan avatar image
Dan answered David Marginian Deactivated commented

I believe I've worked out the answer to this. For some reason we need to specify the taxable amount for ACTION_SECURE_PAY even though the receiving activity should be doing that itself. I believe this is a bug.


OrderCalc calc = new OrderCalc(order);
long taxAmount = calc.getTax();
intent.putExtra(Intents.EXTRA_TAX_AMOUNT, taxAmount);


So we use the OrderCalc class (I wish I knew about this class 5 years ago ^_^) to get the tax amount and by specifying it, it appears in the reporting. I don't think the `isVat` property is actually relevant here.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

I am glad you figured it out, and I appreciate you posting here so that this may help others in the future. This isn't really my area so I am hoping @Jeffrey Blattman can take a look and determine if this is something that we need to write-up.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community