I've followed the "Full Demo with data and setup information" from the wiki. I managed to get the Adempiere to SmartPOS synchronized by testing it with creating a new product in Adempiere and got the product synchronize in SmartPOS.
But when I completed a cash transaction in SmartPOS, I can't see the sales transaction synchronize back to Order Details Report in Adempiere.
I can see that whenever I complete a Sales Transaction in SmartPOS, the Queues in ActiveMQ named ERP1000003, will get "Number of Pending Messages" got updated.
Do I need to configure anything else in order to get this work?
Thanks.
Mohd Shaiza
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Create new product in SmartERP; to check whether the sync works from SmartERP to SmartPOS.
I go to SmartPOS and check Product. Yes, the product that I create from SmartERP is available in SmartPOS. (SmartERP to SmartPOS Sync : Success)
Do sales in SmartPOS; complete Sales Cash. (refer to 1 - Receipt.png)
I go to Order Details Report in SmartERP. Select date 25-03-2012. No order details on the report. (refer to 4 - Selection_005.png)
Finish
Additional Steps
6. I go to ActiveMQ Console, and check the Queues. Got 2 pending messages. (refer to 2 - Selection_004.png)
7. I click on ERP1000003 and find 2 Message ID. (refer to 3 - Selection_003.png)
8. Attached the 2 Message ID for your reference.
- ID_Shaiza-ProBook-49658-1332664552576-3_2_1_1_1
- ID_Shaiza-ProBook-49658-1332664552576-3_3_1_1_1
9. Attached the SmartPOS-Sync.log and 2012-03-20_0.log (Adempiere)
10. Attached ActiveMQ Configuration (ActiveMQConfiguration.png) from SmartPOS.
Hope this will help you find where is the problem in my demo environment.
I have installed everything as per the wiki installation instructions. Everthing seems fine but when I try to syncronize, there is this error:
When I try to syncronize, I get this error
11:05:20,045 INFO [STDOUT]*** ERP Conectandose a activemq:tcp://localhost:61616- como:>smart<
11:05:20,056 WARN [ActiveMQConnection] Async exception with no exception listener: java.lang.SecurityException: User smart is not authorized to write to: queue://0
Any advise?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the log, You have a configuration error in your ERP side:
===========> Trx.commit: AL_d51734b4-f275-4168-a5b8-d5c96007404d [14]
org.postgresql.util.PSQLException: ERROR: insert or update on table "c_order" violates foreign key constraint "c_doctype_corder"
Detail: Key (c_doctype_id)=(1000039) is not present in table "c_doctype".; State=23503; ErrorCode=0
It looks like you changed something in the ERP side, I suggest you to restore the database template provided in both sides ERP and POS and repeat the process, be careful to no change configuration data.
Regards
Pedro Rozo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I managed to have sync of products then was also not able to see orders in ERP. I then examined Shaiza's log and compared with mine. I noticed both had the same foregn key constratint and errors as show below:
...
===========> MDocType.load: NO Data found for C_DocType_ID=1000039 [12]
...
...
...
===========> ERPPosListener.createOrder: Error creating order [12]
...
...
...
===========> Trx.commit: AL_962a99cd-f1b5-4b61-83eb-d45ee23d6bd5 [12]
org.postgresql.util.PSQLException: ERROR: insert or update on table "c_order" violates foreign key constraint "c_doctype_corder"
Detail: Key (c_doctype_id)=(1000039) is not present in table "c_doctype".; State=23503; ErrorCode=0
...
...
I have attached both logs for reference.
Can someone advise why this could be arising in both cases?
From your log files, looks like there is a wrong ERP parameter for the POS integration to old config (from my quick assetment looks like just before our last release (as part or the cleaning tasks) we removed the previous demo company in the ERP wher those parameters were pointing .. sorry about it), but I appreciate your feedback about it.
Having said that, we have tested and fixed for the demo, and now there are a couple of new backups for ERP and POS with demo data here:
As usual you will need to double check IP address for the jms (activemq) urls, database and config to be sure that your POS point tho the right server as the installation guide describes.
For future reference and to understand a bit more the required configuration parameters (ERP) please double check this config in the ERP side to be sure that the transactions are using your current table ids, usually these kind of taks is one of the parts for new and complex implementation tasks for prod environments:
* Configuration Tips on ERP to deal with transaction Issues (POS Integration) *
Though usually everything is provided with the demo with data, if you have any weird behavior during the transaction sync, please double check the following ERP configuration messages required (enter as System/sysDemo) Message window:
These ERP messages manage the default values required to create the ERP documents generated when A POS ticket/return messages coming from POS:
CurrencyId (default currency id for POS orders)
DocTypeTargetID (internal document ID for for your POS sales orders) SalesRepID (default Bpartner id for your sales rep) M_Warehouse_ID (default warehouse for POS orders) PaymentTerm TaxID PriceListId urlqueue c_charge_id (charge id for tips) tenderId creditCardTypeId BankAccount
For example DocTypeTargetID should point to the internal ID of your POS order, you can check this ID (internal ID of adempiere) on your document type window, lookinf for the POS Order and checking with C_DocType_ID is there: 1000123 (similar with the other parameters).
Also be sure that your accounting period is open to create all the invoices, shipments, and so on.
Regards
Pedro R
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Forgive my seemingly very obvious question...but I am unable to identify the "Message Window". The only window I am seeing with the word "message" on it is "Error Messages". I can't wait to see the orders syncing. It will mean I invest a lot of effort in contributing to the project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is very basic ERP stuff George you shoudl improve your ERP skills . I will try to help this time but htis is not an ERP forums, hope you understand
Login as System/sysDemo (English language)
1. Use the lookup field (close the left and top menus) enter message .. and you will get to the message window ...
2. Under the Application Dictionary / Message
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've followed the "Full Demo with data and setup information" from the wiki. I managed to get the Adempiere to SmartPOS synchronized by testing it with creating a new product in Adempiere and got the product synchronize in SmartPOS.
But when I completed a cash transaction in SmartPOS, I can't see the sales transaction synchronize back to Order Details Report in Adempiere.
I can see that whenever I complete a Sales Transaction in SmartPOS, the Queues in ActiveMQ named ERP1000003, will get "Number of Pending Messages" got updated.
Do I need to configure anything else in order to get this work?
Thanks.
Mohd Shaiza
Pedro,
Here are the steps that I did to get the result.
Additional Steps
6. I go to ActiveMQ Console, and check the Queues. Got 2 pending messages. (refer to 2 - Selection_004.png)
7. I click on ERP1000003 and find 2 Message ID. (refer to 3 - Selection_003.png)
8. Attached the 2 Message ID for your reference.
- ID_Shaiza-ProBook-49658-1332664552576-3_2_1_1_1
- ID_Shaiza-ProBook-49658-1332664552576-3_3_1_1_1
9. Attached the SmartPOS-Sync.log and 2012-03-20_0.log (Adempiere)
10. Attached ActiveMQ Configuration (ActiveMQConfiguration.png) from SmartPOS.
Hope this will help you find where is the problem in my demo environment.
Thanks.
Mohd Shaiza
Last edit: mohdshaiza 2012-03-25
I have installed everything as per the wiki installation instructions. Everthing seems fine but when I try to syncronize, there is this error:
When I try to syncronize, I get this error
11:05:20,045 INFO [STDOUT] *** ERP Conectandose a activemq:tcp://localhost:61616- como:>smart<
11:05:20,056 WARN [ActiveMQConnection] Async exception with no exception listener: java.lang.SecurityException: User smart is not authorized to write to: queue://0
Any advise?
Shaiza
According to the log, You have a configuration error in your ERP side:
===========> Trx.commit: AL_d51734b4-f275-4168-a5b8-d5c96007404d [14]
org.postgresql.util.PSQLException: ERROR: insert or update on table "c_order" violates foreign key constraint "c_doctype_corder"
Detail: Key (c_doctype_id)=(1000039) is not present in table "c_doctype".; State=23503; ErrorCode=0
It looks like you changed something in the ERP side, I suggest you to restore the database template provided in both sides ERP and POS and repeat the process, be careful to no change configuration data.
Regards
Pedro Rozo
I managed to have sync of products then was also not able to see orders in ERP. I then examined Shaiza's log and compared with mine. I noticed both had the same foregn key constratint and errors as show below:
...
===========> MDocType.load: NO Data found for C_DocType_ID=1000039 [12]
...
...
...
===========> ERPPosListener.createOrder: Error creating order [12]
...
...
...
===========> Trx.commit: AL_962a99cd-f1b5-4b61-83eb-d45ee23d6bd5 [12]
org.postgresql.util.PSQLException: ERROR: insert or update on table "c_order" violates foreign key constraint "c_doctype_corder"
Detail: Key (c_doctype_id)=(1000039) is not present in table "c_doctype".; State=23503; ErrorCode=0
...
...
I have attached both logs for reference.
Can someone advise why this could be arising in both cases?
By the way Shaiza, did you manage to sort the problem?
Hi guys..
From your log files, looks like there is a wrong ERP parameter for the POS integration to old config (from my quick assetment looks like just before our last release (as part or the cleaning tasks) we removed the previous demo company in the ERP wher those parameters were pointing .. sorry about it), but I appreciate your feedback about it.
Having said that, we have tested and fixed for the demo, and now there are a couple of new backups for ERP and POS with demo data here:
http://smartjsp.com/smartpos-demo/
As usual you will need to double check IP address for the jms (activemq) urls, database and config to be sure that your POS point tho the right server as the installation guide describes.
For future reference and to understand a bit more the required configuration parameters (ERP) please double check this config in the ERP side to be sure that the transactions are using your current table ids, usually these kind of taks is one of the parts for new and complex implementation tasks for prod environments:
* Configuration Tips on ERP to deal with transaction Issues (POS Integration) *
Though usually everything is provided with the demo with data, if you have any weird behavior during the transaction sync, please double check the following ERP configuration messages required (enter as System/sysDemo) Message window:
These ERP messages manage the default values required to create the ERP documents generated when A POS ticket/return messages coming from POS:
CurrencyId (default currency id for POS orders)
DocTypeTargetID (internal document ID for for your POS sales orders) SalesRepID (default Bpartner id for your sales rep) M_Warehouse_ID (default warehouse for POS orders) PaymentTerm TaxID PriceListId urlqueue c_charge_id (charge id for tips) tenderId creditCardTypeId BankAccount
For example DocTypeTargetID should point to the internal ID of your POS order, you can check this ID (internal ID of adempiere) on your document type window, lookinf for the POS Order and checking with C_DocType_ID is there: 1000123 (similar with the other parameters).
Also be sure that your accounting period is open to create all the invoices, shipments, and so on.
Regards
Pedro R
Thank you Pedro.
I will look at the references and post any worthwhile issues.
G. Oremo
Forgive my seemingly very obvious question...but I am unable to identify the "Message Window". The only window I am seeing with the word "message" on it is "Error Messages". I can't wait to see the orders syncing. It will mean I invest a lot of effort in contributing to the project.
This is very basic ERP stuff George you shoudl improve your ERP skills . I will try to help this time but htis is not an ERP forums, hope you understand
Login as System/sysDemo (English language)
1. Use the lookup field (close the left and top menus) enter message .. and you will get to the message window ...
2. Under the Application Dictionary / Message
I'm sorry Pedro, but I can't find any window called message window in the erp also ... I can't find it under Application Dictionary / Message
you can see that in the attachement
See my comments and tips on this thread, https://sourceforge.net/p/smart-pos/discussion/general/thread/3354e91c/