raouf505 / fairpos

Automatically exported from code.google.com/p/fairpos
0 stars 0 forks source link

Ticket not saved when leaving sales panel #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Original OpenBravoPOS saves ticket when changing from sales panel to other 
panels. When coming back, ticket can be continued.
Something must have changed due to our modifications, this does not work 
anymore.

Original issue reported on code.google.com by harald.g...@gmail.com on 8 Jul 2012 at 8:44

GoogleCodeExporter commented 8 years ago
@Vilem, set this to me, anyway you can also have a look.

Original comment by harald.g...@gmail.com on 8 Jul 2012 at 8:44

GoogleCodeExporter commented 8 years ago

Original comment by harald.g...@gmail.com on 8 Jul 2012 at 8:46

GoogleCodeExporter commented 8 years ago
cannot reproduce: * OpenBravoPOS saves ticket when changing from sales panel to 
other panels (...) this does not work anymore.

Ticket is saved when leaving. When re-entering 'Sales', first ticket is loaded 
from the list (see "bullet-list icon" for tickets) - so when are there more 
tickets, odds are that you will need to enter this list & select other ticket 
which you were working on... 

Solution would be easy perharps - OTOH there will probably be none tickets 
saved in the list - besides the ticket saved when leaving sales - so this is 
probably minor problem...

Original comment by benes.vi...@gmail.com on 9 Jul 2012 at 7:53

GoogleCodeExporter commented 8 years ago
On my machine, ticket is only saved when paying.
Going to other menu entry loses ticket.
In the log, no SQL UPDATE is executed on leave, nor is a SELECT on TICKETS on 
entry of the sales panel.
I wonder if there is an option to disable this. What could be the difference?

Original comment by harald.g...@gmail.com on 9 Jul 2012 at 9:19

GoogleCodeExporter commented 8 years ago
Is anything wrong with your db? Locked / read-only access? Something missing?
Did you interfere somehow with shared tickets (maybe JTicketsBagShared class)?

In db, there is 'sharedtickets' table with stored tickets. These (or one of 
them) are loaded when switching back to 'Sales' (or when launching app). I 
tried to delete the ticket (which was created after switching to 'Edit sales') 
from this table. When i switched back, I had no ticket - but I saw in log many 
other SQL queries (TAXES & others)... 

Seems like the ticket is stored (when leaving 'Sales' or when closing app) in 
shared tickets, 

INFO: Executing prepared SQL: INSERT INTO SHAREDTICKETS (ID, NAME,CONTENT) 
VALUES (?, ?, ?)

when returning, it is restored from there:

INFO: Executing static SQL: SELECT CONTENT FROM SHAREDTICKETS WHERE ID = 
'84e851b1-f4f7-4f13-a734-5c1d07baf952'
INFO: Executing static SQL: DELETE FROM SHAREDTICKETS WHERE ID = 
'84e851b1-f4f7-4f13-a734-5c1d07baf952'

----
Full log when change to 'Sales' (eg. fom 'Edit sales'):

Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: SELECT ID, NAME, CATEGORY, VALIDFROM, CUSTCATEGORY, 
PARENTID, RATE, RATECASCADE, RATEORDER FROM TAXES ORDER BY NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: SELECT ID, NAME FROM TAXCATEGORIES ORDER BY NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: SELECT ID, NAME FROM SHAREDTICKETS ORDER BY ID
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: SELECT CONTENT FROM SHAREDTICKETS WHERE ID = 
'26a3aa3a-0c2d-47c5-bc6f-9b2a28e41be5'
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: DELETE FROM SHAREDTICKETS WHERE ID = 
'26a3aa3a-0c2d-47c5-bc6f-9b2a28e41be5'
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.PreparedSentence openExec
INFO: Executing prepared SQL: SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, 
P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, 
P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES, P.PRICESELL_RECOMMENDED, 
P.MANUAL_PRICE FROM PRODUCTS P, PRODUCTS_CAT O, PRODUCTS_COM M WHERE P.ID = 
O.PRODUCT AND P.ID = M.PRODUCT2 AND M.PRODUCT = ? AND P.ISCOM = True ORDER BY 
O.CATORDER, P.NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.StaticSentence openExec
INFO: Executing static SQL: SELECT ID, NAME, CATEGORY, VALIDFROM, CUSTCATEGORY, 
PARENTID, RATE, RATECASCADE, RATEORDER FROM TAXES ORDER BY NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.PreparedSentence openExec
INFO: Executing prepared SQL: SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE 
PARENTID IS NULL ORDER BY NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.PreparedSentence openExec
INFO: Executing prepared SQL: SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE 
PARENTID = ? ORDER BY NAME
Jan 25, 2013 12:49:08 AM com.openbravo.data.loader.PreparedSentence openExec
INFO: Executing prepared SQL: SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, 
P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, 
P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES, P.PRICESELL_RECOMMENDED, 
P.MANUAL_PRICE FROM PRODUCTS P, PRODUCTS_CAT O WHERE P.ID = O.PRODUCT AND 
P.CATEGORY = ? ORDER BY O.CATORDER, P.NAME

Original comment by benes.vi...@gmail.com on 25 Jan 2013 at 12:39

GoogleCodeExporter commented 8 years ago
Works again, no idea what was wrong.
Let's ignore this as it wa sonly on my dev machine and now gone.

Original comment by harald.g...@gmail.com on 2 Feb 2013 at 10:52