Login  Register

[jira] Created: (OFBIZ-1376) Possible issue with POS transactionId

Posted by Nicolas Malin (Jira) on Nov 01, 2007; 2:51pm
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-1376-Possible-issue-with-POS-transactionId-tp185024.html

Possible issue with POS transactionId
-------------------------------------

                 Key: OFBIZ-1376
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1376
             Project: OFBiz
          Issue Type: Bug
          Components: pos
    Affects Versions: SVN trunk
            Reporter: Bilgin Ibryam
            Priority: Minor
             Fix For: SVN trunk



Hi all,
I have a question about r577589 which does the following change:

Index: src/org/ofbiz/pos/PosTransaction.java
===================================================================
--- src/org/ofbiz/pos/PosTransaction.java (revision 577588)
+++ src/org/ofbiz/pos/PosTransaction.java (revision 577589)
@@ -108,7 +108,7 @@
         this.locale = (Locale) session.getAttribute("locale");
 
         this.cart = new ShoppingCart(session.getDelegator(), productStoreId, locale, currency);
-        this.transactionId = session.getDelegator().getNextSeqId("PosTransaction");
+        this.transactionId = session.getDelegator().getNextSeqId("PosTerminalLog");
         this.ch = new CheckOutHelper(session.getDispatcher(), session.getDelegator(), cart);
         cart.setChannelType("POS_SALES_CHANNEL");
         cart.setTransactionId(transactionId);

If you look at PosTransaction constructors you will see this :

        transactionId = session.getDelegator().getNextSeqId("PosTerminalLog");
        txLogId = session.getDelegator().getNextSeqId("PosTerminalLog");
        txLog = session.getDelegator().makeValue("PosTerminalLog");
        txLog.set("posTerminalLogId", txLogId);
        txLog.set("transactionId", transactionId);
 
At the beginning the first transactionId is 10000 and posTerminalLogId is 10001 and this is recorded to PosTerminalLog entity.
Then next transaction is 10002 (but not 10001) and then again this is recorded to PosTerminalLog enitity like this:
posTerminalLogId posTerminalLogId = 10003, transactionId = 10002
For me one of these Ids looks redundant. At least i cannot see any meaning in recording both to PosTerminalLog if we know that posTerminalLogId is transactionId + 1.
Do i miss something?

Regards,
Bilgin Ibryam

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.