Linking Sales Ticket and Refund Ticket in Java POS - javapos

In Openbravo POS when I'm refunding a sales ticket (assume its id to be 3980) and when I refund this ticket it generates a new ID(assume it to be 48). So, I want the refund Id(48) to be printed on the sales ticket whenever I do a refund. Does anyone has any idea how to do it?

You will actually have to modify the ticketline table and add a new column RefundedTicketId and link the ticketline for a sale to the ticketline of the refund. Note that the refund quantity maybe less than the original purchase. I am implementing this right now to prevent duplicate refunds. If anyone is interested i can post the highlight of the code.

Related

How rename description of Stripe subscription invoice line item from "trial period"

I have a plan for which I generate subscriptions with trial periods.
Stripe is generating invoices with a line item of 0$ for this trial period, with Trial period for <my_plan_name> as description. I would like to rename this description because my customers are French (and you know, we French people don't speak very well English but that's another story).
When I'm trying to update the item description
Stripe::InvoiceItem.update("sli_xyz",
{ description: "Essai..." })
I'm getting error Stripe::InvalidRequestError: When passing an invoice's line item id, you may only update tax_rates.
I can't delete such a line item neither because this is a subscription item and I can't remove the description neither.
What am I missing here ? Is there a way to resolve that ?
There are two Stripe concepts here: an Invoice and InvoiceItem.
InvoiceItems are essentially line items of individual items/services that is being tendered. An Invoice can contain many InvoiceItems. Imagine an Invoice is the complete receipt, and InvoiceItem is the individual grocery item.
Normally, you can update the InvoiceItem either before you attach to an Invoice, or even after you attach it, before the Invoice is finalized/closed (a.k.a. paid for by the customer).
Stripe does not allow you to update the description of InvoiceItems that are closed/finalized, because as a merchant, invoice is a record of what you sold (and receipting) to the customer, and once the invoice paid by the customer, you cannot change it.
Imagine if your invoice was originally for 50 beers, but after they pay for it, you decide to update the invoice to say 5 beers! How is that fair to your customers?
Your only solution is to make sure the description is defined properly in French for your French customers before issuing the invoice going forward into the future.
There is no way to fix this for past InvoiceItems.

Magento Order gets closed when doing a partial refund with adjustment fee in it

I have an issue in magento enterprise as follows
Place an order with 3 items in it
Redeem some money from the
customer's store credit when placing the order. For example if 200
is the total order amount, 50 should be paid from the customer's
store credit and 150 should be paid as normal payment.
Ship the order via backend
Create credit memo for any 1 item in the
order.
Add 1 in the adjustment fee field in the credit memo form
Save the credit memo.
The credit memo is created successfully, but the order status becomes closed. Due to this I am not able to raise another credit memo next time If I need to refund any or the remaining items in the order. This issue happens only if customer has redeemed his store creid in the order amount.
Could somebody please help me on this?

Magento Refund Table

Where can I find the refund tables in Magento?
I want to find out if a person has received refund for a certain product or not?
If no refund tables how magento track that?
Refunding an Order in Magento does not cause an actual payment refund. You must refund the payment on your own. Credit Memo is only a record used to track the refunds and to provide proper values in the reports. Check the below link so that you can get more info about the table relations.
http://www.magento-exchange.com/magento-database/magento-1-4-database-er-diagram-for-sales-credit-memo-tables/

how can i decrease the product price on cart page?

If the user has an existing account balance, I'd like to give him the option to specify how much of his previous balance to apply to the item and sync this info with the cart and order. I have already implemented the user's account balance, both on the front and back end.
Would a coupon-like system work best, or should I try something else?
Thanks in advance.
I would let the customer decrease its cart total with the balance would be more simple / logic for the customer also (?)
What E-commerce solution do you use? Magento(?) If so there are coupon extensions that can handle this.
You could also build a simple balance system where users would see there balance in there account ( if such feature is implemented) or just mail them a message with a unique code that you save in DB + the value of balance then use this code as a coupon on checkout.
We have created quite a few e-commerce solutions up to date. Usually, when user balance is involved, then what you do is create two transactions referred to one invoice. In the first transaction specify the amount taken from balance, where as leave the other transaction for whatever checkout method you use. Upon callback from the checkout, see if the balance paid matches the invoice to mark it as paid respectfully.
Alternatively, you can use discount - decrease user balance and add "discount" to the order. It all depends on your accounting needs and preferences.
On Amazon they allow you to apply any unused balance to the existing order. Its when you checkout that they say you have $150 credit on your account, would you like to apply this to your order, it defaults to yes in a tick box.
Its quite neat and simple, it doesn't allow you to apply a part amount from what I've seen.
Then when you go to payment you pay $total - balance.
So if you have $200 total, the payment via credit card would be for the $50.

Partial refunds in Magento

How do I get a partial refund (credit memo) working in Magento? I have a customer who bought 3 items but only wants to get a refund on one of the items. Is there a way to do that?
Also, can I move that item back to the inventory (like updating the stock automatically)?
Some payment types support partial refunds. Most credit cards do not, as the gateways don't support a partial refund on the authorization. Can you please elaborate on your payment setup, including how you reconcile those payments?
Short answer to your second question is yes.

Resources