Remote Server Synchronization-Invoice To GRN Conversion [MIGRATED]

MIGRATED TO  http://wavelet.asia/customer-portal/2011/02/28/rss-invoice-to-grn-conversion/

As this procedure is a complicated process and 2 different servers are involved. the configurations need to be set correctly for it to work.
Please make sure you follow all the steps.
As a good effort has been put on error handling, if you face a red blinking error , the information the error message gives should be enough for you to trace the error in the configuration and fix it.

2 servers involved 1 belongs to the supplier who is actually the server that has issued the invoices i am going to call this entity as HOST .
I am going to address the other machine, which is actually the customer machine and is going to import the invoices from the HOST  and create GRN for each of them, as CLIENT.

0-Function Link
The function is available under Procurement-> Remote Server Synchronization -> Invoice to GRN Synchronization. or alternatively the direct URL of the page ( /emp/procurement-rss-invoice-to-grn.do )

1-User Authentication
Imagine the scenario that user XXX in CLIENT machine logs in with password AAA to do the synchronization.
user XXX  must exist on the HOST  as well. else the transaction will be dropped by the HOST .

2 permissions are involved in this procedure
I-Trading-> Receive Stock By Branch
II-Procurement ->General Permissions -> Remote Server Synchronization Permission.

For the user being able to access the function on the CLIENT side user XXX must have both permissions on the CLIENT side.
For the Transaction to go through on the HOST side user XXX have to have at least permission I on the HOST  side.

3-Supplier Customer Mapping
this setting should be done on The CLIENT side.
You need to create a Customer lets say CUSTOMER-A. CUSTOMER-A name must be the exact match of CLIENT's customer account on the HOST side. else server will not be able to find 
invoices issued to the CLIENT and an error will pop up.
after this is done.
go to accounting->maintenance -> configuration -> Intercompany Stock Transfer Configuration (/emp/acc-config-intercompany-stock-transfer.do)
and attach the new customer you have created to the correct supplier (HOST's supplier account on the CLIENT side).

Lets say CLIENT's customer name on the HOST's server is SOROOSH and host supplier account name on CLIENT's machine is SINA  then you need to create a customer name SOROOSH in CLIENT's server and attach them 
as a customer supplier pair in Intercompany Stock Transfer Configuration as you can see below

after going through all the 3 steps above we are good to connect to the host's server.

go to the function mentioned in step 0  you see a page Like This

the fields are 
A-Branch : any branch you set here will be used as the branch for GRN which will be created.
B- Supplier : choose the same supplier that you have mapped to CLIENT's customer account as added in step 3 above.
C-webservice URI : lets say your server with which you want to synch is located at http://test.wavelet.biz:8080/emp so you need to type in URL address in the field (http://test.wavelet.biz:8080/emp)
D- date range : tells the SERVER to pull out the invoices issued to CUSTOMER-A in this date range
EPassword: Enter User XXX's Password on the HOST server (step 1).

press generate list 

you will see a list like this

you can select any invoice that you want to be imported as GRN and press submit.

Note that if by mistake you select an invoice which has already been imported as GRN no transaction will take place and you will receive an error message and you have to select again.
also note that when you import an invoice and item codes in the invoice does not exist in the CLIENT's database the system will automaticall create those item Codes and will notify the user after the process finished.

Error Message Dictionary

Error Messages appear on top of the page in a red colored fonts (and blinking if you are using Mozila Fireforx). Something like this

Notification And Errors can be classified into 2 categories.
1- Errors faced in Client side and notifications sent by Client.
2-Errors faced on Host side.

1- Errors faced in Client side:

A-Branch Has not been set :
make sure after you have chosen the branch from the drop down list you press the Set Branch Button right next to it.

B-GRN No ... exists in database for remote invoice No ... :
this invoice No has already been converted to GRN if you feel that this error has popped up wrongly you can check the GRN numbers given to see if there is anything wrong.

C-Customer Supplier Set Does not have a match in InterCompany Stock Transfer Configuration :
System can not find any matching customer attached to the selected supplier. you should check the intercompany stock transfer configuration (step 3).

D-Set the Supplier :
You have not selected any supplier in the page.

E-Web browser's Page Not Available Error:
if you get this error it means the URL you have set is a wrong and therefore the CLIENT can not find access the HOST.

D-During The Import Process Follwoing Item Codes did not Exist in The database and has been created accordingly :
Before the client's server start creating GRN's it checks whether the items in the invoice exist in clients server or not.
if some of the items does not exist the system will automatically create these items and will notify the user that these item codes has been created.

2- Errors faced in Host side:

A-User Name ... Exists in Server but Passwords Do Not Match :
The password you have typed in the password field is wrong and does not match with the passwword in the HOST's server.

B-User Name ... Does Not Exists in Server :
this error occurs in the case where for instance you have logged in to EMP with username SOROOSH  to the CLIENT's server to do the synchronization but same user name does not exist in the HOST's server.
check if you have correctly configured the authentication configuration (Step 1).

C-User ... Does Not Have Permission To Do Remote Server Transactions on The Server.
this error occurs in the case where for instance you have logged in to EMP with username SOROOSH  to the CLIENT's server to do the synchronization but user SOROOSH  does not have Remote Server Synchronization
permission on the HOST's server. 
check if you have correctly configured the Permissions (Step 2).

D-Customer Name .... Does Not Exist In the server.
The customer Name you have attached to the supplier in Inter company stock transfer configuration does not exist on HOST side.
make sure the name of accounts in CLIENT and HOST are exact match.