red1.org Forum Index red1.org
Nihili est - in vita priore ego imperator romanus fui
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Case II - Topic 3: setup ImportOrder, batch run OrderProcess

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Compiere Case Workshop
View previous topic :: View next topic  
Author Message
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Fri Jul 09, 2004 12:03 pm    Post subject: Case II - Topic 3: setup ImportOrder, batch run OrderProcess Reply with quote

Topic 3 shall cover the Import Order – loader format setup. Then we convert the dbf files to CSV. A close look at the ImportOrder.java. Building a batch process for high volume POS Orders. Linking it to the Compiere Menu with parameters. We also parse the orders to various walk-in BPartners of the credit-cards for final settlements with the respective merchants.
Having specific BPartners for each credit card operator allows us to assign specific accounting elements to them. When the credit card merchant pays the client, there will be visibility of the credit card fulfillment or variance thereof. To assign the BPartner in the Import Order begins prior to the import. This is done via a Delphi program that parses the data and insert the PaymentRule as B for cash, or K for credit card. To proceed without modification, the Description field of the OrderLine is used to house the credit card details. Also the PaymentTermValue is used to house the PaymentRule as the later is not created in the I_Order table. I avoided extending too much the structure to avoid creeping bugs (debatable) but more importantly to Proof-of-Concept Compiere’s case as this is again a pioneer installation. Isn’t the whole world watching? Especially big brothers sap and oracle. Twisted Evil


Last edited by red1 on Mon Jul 12, 2004 10:19 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Fri Jul 09, 2004 4:48 pm    Post subject: sub-topic - Batch Process Sales Orders Reply with quote

When you are in a Sales Order, there is a process button on the bottom right that summons a SQL process - 'C_Order_Post.sql. We will reuse that process as a Batch process. This means it will have to run for all records in question rather than a single Order.
You have to define a new Report & Process from the Application Dictionary. Make this in turn to call B_Order_Pos.sql . The modifications are minimal, just the reception area for parameters and getting a CURSOR to loop into the I_Order.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Tue Jul 13, 2004 1:00 pm    Post subject: Work progress Reply with quote

TODO List to make all this happen!
1. ImportOrder.java changes - to allow keyfield conversion
2. Create extra I_Order fields – not present for keyfields
3. Build Import File Loader – to select/activate I_Order fields used in Import
4. Create Standard Walk-In Business Partners for CASH, VISA, MASTER AMEX
- for Accounts posting and merchant bank clearing management.
5. Create ImpOrderDelete.sql – to reverse Sales Orders import as exit plan.

KEYFIELDS IN I_ORDER TO BE USED (SET IN LOADER)
a. DateOrdered format dd/MM/yyyy
b. OrgValue
c. PaymentTermValue
d. DocumentNo
e. SalesRepValue
f. DocTypeName
g. C_Tax_ID
h. ProductValue
i. PriceActual
j. QtyOrdered
k. Description

CREATE EXTRA KEYFIELDS THRU APP. DICT. FOR I_ORDER
a. OrgValue
b. SalesRepValue

CHANGES IN ImportOrder.java
• Convert OrgValue to Org_ID.
• Convert SalesRepValue to ID
• Set documentNo to combi key Date-Org+PayRule
• set C_BPartner according to VISA/MASTER
• Disable PaymentTerm as taken over by PayRule (POS orders has no terms)
• Rule in C_Order set to K or B (credit card or cash - Compiere hardcode setting)


Last edited by red1 on Thu Jul 15, 2004 10:44 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jiang Nan



Joined: 08 Jul 2004
Posts: 4

PostPosted: Tue Jul 13, 2004 6:30 pm    Post subject: Reply with quote

So many tables in the oracle database, how do you understand each columns's meaning in the table. since there are no comments. ERStudio is new to me, then I can hardly figure out the relationships between tables. what's different between table i_order and c_order. I think you have read source code, or maybe you have internal develope document:). BTW, You can import data by a oracle tool called sqlldr.
Back to top
View user's profile Send private message
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Thu Jul 15, 2004 10:19 am    Post subject: Understanding Compiere Tables Reply with quote

Well Jiang,
There are certainly tons of tables in Compiere, and when i first open them for a peek in ERStudio, i was like in a little universe!
Anyway, i hardly refer to the ER, i mostly understood the role and context of such tables from about a year of working with them.
To understand for example C_Order, it was first discovered thru the Application Dictionary. U can refer to www.compiere.org for these fundamentals. By looking under Menu, we identify the Window which we want to look into. From there we look up which table the tab is refering to, and so on we get to the Table-Column and thus one can find out that Sales and Purchase Orders uses the same C_Order table. When we enter data, we can quickly use TOAD, or other oracle database manager to peek inside that our data is indeed in that table.
I do not have an internal development document. I am trying to write it up. This Case Workshop is just the beginning. 1 thing i can say is that a real technical commentary will make very boring reading as it will be thick and terse. So i try to use real case scenario to make it less painful! Cool . But i like to write that too! Rolling Eyes
Thanks for your comment and advice on this other tool, i will look it up too.

red1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
der_bonner



Joined: 16 Dec 2004
Posts: 27

PostPosted: Sat May 28, 2005 6:02 pm    Post subject: some special needs Reply with quote

Hi board,

in order of red1's brilliant introduction I have some (little) special needs that I can't solve yet...

I have a certain format of order lines that I would like to import in compiere. Well... I try to explain what I need to do:

Businessparters are using a service with recurring charges. I think Compiere is able to handle that. Beneeth this recurring charges there are additional services they use. Reference is a ID numberof the recurring service. So Compiere will regularly produce invoices for the recurring service.

I need to add the additional services to a n recurring service.

Unfortunatly the files providing the additional services have a very special format.

text file with fixed field lenth (easy...)

but: first line has some special header info
second line has some special header info
then many lines follow describing additional services for a service ID

then a summary lilne for the service ID follows and again many lines follow describing another service ID....

Most basics I understood from red1's documentation.

But how to import these mixed lines and how to get them to the subscription?

Any idea how to help?

cheers
Back to top
View user's profile Send private message
trifon
Senior


Joined: 23 Dec 2004
Posts: 324
Location: Bulgaria, Sofia

PostPosted: Mon Jun 06, 2005 6:11 am    Post subject: Reply with quote

Hi,

I do not understand fully your format, but if you post some part of it probably we could find some solution.
and in order to import this you will need to change some imports(java source, sql statements)

Regards,
Trifon
_________________
Trifon Trifonov
Back to top
View user's profile Send private message Yahoo Messenger
neilg
Regular


Joined: 16 Jun 2005
Posts: 141

PostPosted: Sat Jun 25, 2005 4:31 am    Post subject: Reply with quote

I'm also writing something, it's in the contributors corner, which will ease the importing of data (e.g. from CSV) because the row by row processing is made simpler.

Keep watching that spot because it should be finished soon!

Neil
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Compiere Case Workshop All times are GMT + 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group