Reverse a Pos Order Odoo 10 - odoo-10

I created a pos sale, made payment, posted the journal entries and closed the session. Now i need to perform a reverse entry for that pos order. No need to make reverse the product. Because that sale should be considered as Free of Charge.
In new session,
Create a order with negative quantity & amount.
Make payment
Post the journals and close.
Are the above steps will be enough?
or
I need to create manual journal entry & post ?
Which solution is best?
Is there any other solution?

Related

Event Before the Record is changed in MS Access

I have an MS Access Form where I have two subforms. I need to be able to run a code/query before the record is discarded.
This DB is for tracking a hotel's sales and payments. The bounded form has the following layout:
First we have the main form with global fields like, ClientID, client name, address, bill date, restaurant bill, spa charges, etc.
Then I have the rooms subform (Datasheet view). This form has all rooms allotted to the guest. It also has the number of days charged and Rate fields.
Lastly I have a payments sub form (DataSheet View). It has all payments received from the guest. Last Tab index is for the payments Subform. I need to find the total amount the customer was billed. (sum of all room rate X number of days + Money Spent in Spa + Restaurant Bill). I also need to find the sum of all payments. If the total payment is different from total bill then I need to prompt the Operator to confirm the addition.
I know the VBA codes and queries to process the above. But what I do not know is how to trigger this event. I tried AfterUpdate, but it is fired the moment I move to any Sub Form. I need the code to run after the Operator has made all changes and is ready to move to the next record. I am at a loss on how to accomplish this.
You could just place the function in the after update of the last field in the operator's workflow on the last subform?
Alternatively, place a check to run the code on your move next/prev buttons to ensure the operator has completed the entirety of the workflow?
Could you post a ss of the form(s) so I can get a visual picture :)?

Magento - How can I synchronize invoice numbers with credit memo numbers?

Let's say we have invoice number #1 then invoice #2 but then I need to have a credit memo with number #3. After that of course I will need an invoice with number #4.
Is this possible?
No is the simple answer. Invoices, Credit Notes, Orders, & Customer Increment ID's have their own numbering system. The last increment ID for each object type is stored in the table eav_entity_store (take a look). You could override the class Mage_Eav_Model_Entity_Type and function fetchNewIncrementId() to possibly achieve what you are trying to do, but generally it's good practice to have sequential numbers for each object type and not share the numbering system between different objects. Auditors for example will want to see sequential order numbers and sequential invoice numbers otherwise it's easy to fiddle the books as it's difficult to work out if an invoice was deleted etc. I would check with accounts and auditors first to see if your allowed to do what you want too first.

Expresso Store - Exclude Product from Order Quantity

I'm using Expresso-Store to process product orders for a non-profit. In addition to selling a range of handmade products we are offering visitors an option to donate.
I have most of the donation stuff working just fine. I used Justin Long's advice posted here: http://iamjustinlong.com/blog/single/accepting_donations_with_expresso_store/
As suggested I have created a channel for all the products and then a separate channel which holds a single "Donation" product with a cost of $1.00. The visitor adjusts the quantity of this item which results in a donation amount of $1.00 * qty.
The specific problem I'm running into is displaying the total quantity of items in the cart when there's also a "Donation" product added. Since the donation amount is determined by quantity * $1.00 but in reality it represents a single donation, my {order_qty} is way off since it includes the many multiples of Donation products.
I have a small cart icon that is displaying a number above and next to it with the {order_qty} but I need to exclude the donation product from this calculation. How might I go about this?
This would be fairly difficult to do using the current version. The best I can suggest is not to display the {order_qty} on your checkout page (most sites only display the total anyway).
However, in saying that, the next version of Store has first-class donations support, so it will soon be possible.

Syncing online and offline stock levels

We have an e-commerce site, and several bricks & mortar stores.
I have managed to extract stock data from the "bricks & mortar" database and send this up to the website, but putting the online sales back into the database is proving almost impossible. No docs + uncooperative vendor.
What happens at the moment is the website sells something, the order is processed manually into the store database and then the stock levels are updated back to the website. The issue being that the stock levels are not updated instantly so there is a possibility 2 people can purchase the same item, especially with sale items where there is only a single item left.
I am wondering if there are any good solutions to this?
One thought I had was to store the number of purchases on the website, and subtract that from the number of items in-stock leaving the correct stock level. But then once the order is processed in the "bricks & mortar" store, the stock level being exported to the website would be inclusive of that difference, and my online stock levels would be incorrect.
Any help pointing me in the right direction would be greatly appreciated
You should use a 'lock' and 'confirm' approach. If a customer at one POS is requesting an item, you should contact the server and lock up the item if it is available. Then customer will have a few seconds to 'confirm' the sale (otherwise the POS requests the server to unlock the item).

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.

Resources