Click here to Skip to main content
16,004,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Good day asking for help.

I'm trying to make a POS System using VB.Net 2022.
My problem is on how to retrieve the value deducted qty when the transaction is canceled .

What I have tried:

Ex.
tbl_item
---------------------------------------------
Barcode | item_name | item_qty | item_price
1234555 | Chips     | 95       | 20
1284588 | Bread     | 95       | 20

tbl_invoice
----------------------------------------------
invoice_id | item_name | item_qty | total_price 
1000000    | Chips     | 5        | 100
1000000    | Bread     | 5        | 100

Scenario:
When the item is scanned 
the qty should deduct based on amount of qty.
then save in tbl_invoice
and put in DataGridView.

When the transaction is canceled the qty should return to the specific item in tbl_item.

Private Sub btn_cancel_Click(sender As Object, e As EventArgs) Handles btn_cancel.Click

What so I do?
Thank you.

End Sub
Posted

1 solution

So I suggest that you do the transaction (modify your database) only if you press the OK-Button or something similar.
The Button Cancel ha sno need to do anything ...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900