question

saad-bin-iqbal avatar image
saad-bin-iqbal asked saad-bin-iqbal commented

Can we give amount to the Clover for the PER_UNIT Item?

As I add Per_Unit item to the Order by giving orderId, itemId, quantity(like in Gallon) and user data if required.But I don't provide the amount because Clover calculate amount based on the quantity respected to the Item's price. Below is the code to add PER_UNIT Item- mOrderConnector.addPerUnitLineItem(mOrderId, mItem.getId(), posLineItem.getItem().getFuelTransactionBean().getUnitQuantity(), null, userDataObject.toString()); So I just want to know if I can provide the amount for the PER_UNIT Item to the Clover so that we can give amount according my requirement(or calculation)?<br>
Clover Android SDK
3 comments
10 |2000

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

saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Guyz I need your help

@Jeffrey Blattman, @Jacob Abrams, @Mark Mullan

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ saad-bin-iqbal commented ·

Are you saying you want to provide the total amount for the item (overriding the unit price * quantity) or you want to provide a custom unit price?

0 Likes 0 ·
saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Yes, I want to override Total Amount (unit price * quantity) for UNIT_PRICE Items.

Currently, I provide just total quantity to the Clover through OrderConnector(Android SDK) and Clover calculate Total Amount based on the Item's price that Clover already having.

So I want to give Clover both total amount and quantity according to my some calculation.

0 Likes 0 ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered saad-bin-iqbal commented
You can't override a per-unit total price. If you want to provide a custom price, create a custom fixed-price line item instead. It sounds confusing that you want a line item with a unity quantity and price, but then set the actual price to not fit the math. Imagine someone going back and trying to reconcile the amount of that order.

You could use line item notes to record the quantity or other details.

If you goal is to discount the line item, you could use a line item discount.
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.

saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Okay.

Thanks a lot Mr. @Jeffrey Blattman

0 Likes 0 ·

Welcome to the
Clover Developer Community