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 

Generate BOL Process
Goto page 1, 2, 3  Next
 
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 -> International US Trading
View previous topic :: View next topic  
Author Message
red1
Site Admin


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

PostPosted: Thu Oct 13, 2005 9:09 am    Post subject: Generate BOL Process Reply with quote

Generate BOL is now in progress...

This is the Batch Processing Run to Generate Bills of Lading based on Customers, Orders or BOLNo. ( BOLNO will be used as filter key)

>Created Druid for C_BOL and C_BOL_Line in minimal form for POC.
>Generated XML2AD files.
>Executed in local instance.

>Identifier is Name

>Created Report & Process (modified from present BatchPrintBOL)
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: Mon Oct 17, 2005 9:43 am    Post subject: Reply with quote

Trifon has mailed me from Cyprus the ImportBOLComment stuff:
latest build http://red1.org/barn/HutzlerCompiereUSA/sources/impBOL.zip

trifon wrote:
Hi Red1,

Because here i do not have ftp access now i'm sending
you import of BOL Comment which i made for Rich.

Whis is mapping of csv file to I_BPartner table. I
think that Rich will understand what it means.

co/customer # --> BP Search Key
location # --> Location Search Key
line #(comment needs to be concatenated) --> NOWEHERE
comment --> Comments
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: Mon Oct 17, 2005 6:31 pm    Post subject: Reply with quote

I have done the BOL Generate routine but i want to clear one point before i prepare the druid files, SQL and link to the PrintFormat.

1) Does BOL Generate appendsthe OrderLines of similar BOL Nos. together?
I.e. if Order A is BOLNO '001' with 2 lines L1 and L2, Order B is BOLNO '001' with just one line L3, then the generated single BOL has 3 lines from L1, L2, L3?

I have made additional fields to the Order table:
a) BOLNO used as ID for common merging.
b) C_BOL_ID to mark that it has been used during generation and not used unless cleared.

I m now commiting my codes to a new location in Unversity > C-252d.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Mon Oct 17, 2005 11:29 pm    Post subject: Reply with quote

red1 wrote:

1) Does BOL Generate appendsthe OrderLines of similar BOL Nos. together?
I.e. if Order A is BOLNO '001' with 2 lines L1 and L2, Order B is BOLNO '001' with just one line L3, then the generated single BOL has 3 lines from L1, L2, L3?

Yes, but we are not using orderline directly; we are subtotaling order lines into Packcode subtotals.
Back to top
View user's profile Send private message
red1
Site Admin


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

PostPosted: Mon Oct 24, 2005 10:52 pm    Post subject: Reply with quote

Here is the first part of http://red1.org/barn/HutzlerCompiereUSA/sources/BOL.zip .

1) RUN XML2AD on the ADBOL.xml

2) go into SystemAdmin>Table&Column , look for C_BOL and synch just one field in there. Do the same for C_BOL_Line.

3) in your DB Editor, run the alterBOL.sql.

4) RUN GenerateModel 'A'

5) CVS for BOL_Generate.java or take it from the zip and place in your source.

6) SystemAdmin>Process&Report create a new process Generate BOL which has no parameters and classname is org.compiere.process.BOL_Generate.

7) The window part for the BOL tables will arrive tomorrow. Up to here only the C_BOL and C_BOLLine tables are created, and also the batch process.

Further updates will be sent to the same spot.
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 Oct 25, 2005 7:32 pm    Post subject: Reply with quote

BOL progress & steps to take at US side:

Belated realisation that BOL Main table doesnt keep C_BPartner_ID. Its not stated clearly on the BOLfields.xls. Reckon it should be stated as #14 on the HutzBOL_mark. Otherwise the Location doesnt get tucked right.

RUN ADBOL.xml again from XML2AD to get the new C_BPartner field. Sync the column from Table&Column window.

GenModel 'A'

RUN viewBOL.xml from XML2AD

In ClientAdmin>Role - WindowAccess tab - new record>Window - Bill Of Lading> Read/Write checked
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: Wed Oct 26, 2005 7:03 am    Post subject: Reply with quote

Also we need to establish the parent-child relationship in BOLMain / BOL Lines, by going to SystemAdmin>Table&Column>Table(BOLLine)>Column(C_BOL_ID)>Parent link column - checked.

I m now tidying up the codes to fetch BOLComment from BPLocation Product PACKC and WHSLC.

Then the PrintFormat switch for Batch Run and manual invdividual print.
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: Wed Oct 26, 2005 5:53 pm    Post subject: Reply with quote

EMBARGO - PLS DO NOT DO ANYTHING YET - I DISCOVERED SOME PREREQUISITE ERRORS - LET ME PROVE AND SORT OUT SHORTLY AND THEN GIVE U THE GO AHEAD.

Otherwise i wanted u to follow the following notes:
Code:
We need to recreate a Print Format for this BOLView, but first we extract a Table&Column from that

view.

Copy Table&Column M_InOut_Header_V
Change name to 'C_BOL_Header_v' (ad-verbatim exactly or the auto create cant find it)
Click on 'Create Columns from DB' button
Note from pop-up that fields are populated

Now for the PrintFormat
Login as SystemAdmin (Report & Process later requires your PF to be under System)
Copy the Bill Of Lading PrintFormat
Give a different name to avoid confusion: 'CBOL'
CLick on 'Copy/Create' button
Select Bill Of Lading (or your presently named BOL PrintFormat)
(its useless to change the Table name to C_BOL_Header_v just yet as system will revert back)
To change the Table to ours, we go into DB Editor and locate the AD_Table_ID of the latest table we

just created.
Then locate the latest PrintFormat record, go to the column 'AD_Table' note that its '500'. Change

that to your latest AD_Table_ID. Mine is 1000015.
(If your present PrintFormat is not under System u can then login as ClientAdmin, and create this

PF, then change its AD_Client_ID to '0'in the DB Editor. Go to the AD_PrintFormat table and locate

your record.)

By changing that ID, its now refering to our CBOLView table, but its not so in the Format Item tab.

Go into the PF>Format Item tab to replace Item 'Consigned to'> column - 'BPValue_BPSearchKey'.
U have to deactivate the DocumentNo field as we missed that field. We can patch in later once this

concept run proven.

Now we create a new Report&Process to house this PrintFormat.
Create a new one called "RPT_BOL"
Check 'Report' box
In Print Format select your 'CBOL' PF

Do a cache reset if u do not see your new creation

Now call up Window Tab & Field, for your Bill Of Lading window.
At the Tab for main, select in Process list, your 'RPT_BOL'

We have to go back to the PrintFormat and deactivate the detail line temporary to test.

Then we recreate the detail line format as we did for the header format.

ERROR IN STEPS... Went after the wrong BillOfLading instead of BOLPrintFormat. Also need to bring in C_Order_ID or DocumentNo during generation. This field is also left out in C_BOL
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: Thu Oct 27, 2005 6:24 pm    Post subject: Reply with quote

Deleted BillOfLading PF
Added DocumentNo to druid, added manually in Table/Col, synched
GenModel A
Bring into BOL Window
setDocumentNo in BOL_Generate.java
set in C_BOL_Header_v.sql
recreate Table&Column C_BOL_Header_v
copy BOLPrintFormat
Change AD_Table_ID to 1000015 and AD_Client_ID to 0.
Update AD_PrintFormatItem set AD_Client_ID = '0' where AD_PrintFormat_ID = '1000039'
Commit in TOAD
Remove delivery via rule ID from PrintFormatItem (SystemDate row)

Single record print brings problem due to query asking for C_BOL_Header_v_ID which doesnt exist.
Fooled it by creating a dummy namesake ID.

Attach BOLWatermark

SUCCESS!!

Both single and batch BOL printing can now work. Now for me to take some rest and continue

documentation for transfer

But still we have to first get the Detail format setup.
examine BOLLine PF
refering table RV_InOutDetails
goto TOAD, make a copy of that SQL, and setup in TableColumn and PF, remembering to have table_ID as

the main hdr remedy.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Fri Oct 28, 2005 6:13 am    Post subject: Reply with quote

red1 wrote:
Trifon has mailed me from Cyprus the ImportBOLComment stuff:
latest build http://red1.org/barn/HutzlerCompiereUSA/sources/impBOL.zip


The way it should work is that if there is a match for a BP(searchkey)/Location(searchkey) and BOLcomment field = NULL, then BOLcomment = comment from import. If BOLcomment field <> NULL, a new line should be concatanated to the the BOLcomment field value and the comment from import should be added to BOLcomment field. The imported data is sorted so that it is imported in the proper order.

I ran the BOL import and it didn't work right. It only imports one of the lines and has a "null/n" before it. For example, actual import was:
null/nAPPOINTMENTS REQUIRED FOR DELIVER

when it should have been:
APPOINTMENTS REQUIRED FOR DELIVERY
CALL: (215)768-8262
RECEIVING HOURS:
MONDAY THRU FRIDAY
7:00 AM - 3:00 PM
DRIVER TO HELP UNLOAD AT DOCK

Maybe the BOL comment field isn't configured properly. Otherwise the instructions are pretty straight forward and simple. Trifon described the fields that are used in the email/post above.

Let me know your thoughts. You can check the I_BP (the last 402 lines are for BOLcomment import; ignore the rest) and BP/location windows in my instance.

Thanks,
Rich
Back to top
View user's profile Send private message
red1
Site Admin


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

PostPosted: Fri Oct 28, 2005 4:30 pm    Post subject: Reply with quote

final notes on BOL which is now fully proven
Code:

examine BOLLine PF
refering table RV_InOutDetails
goto TOAD, make a copy of that SQL, and setup in TableColumn and PF, remembering to have table_ID as the main hdr remedy.
Note that Packing List (Shipment) uses M_InOUt_Details_v. This BOL was proven on RV above.
(BOL) No Packages; (BOLLINE)Weight, C_OrderLine_ID, Line (done) - Put into Druid. Need to make beforeSave and setLine in MBOLLine.java. (done)
Line>Default Logic - @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_BOL_Line WHERE C_Order_ID=@C_Order_ID@

Must turn on Druid>FieldAttribs>Name>Reference/InSummary(checked). This allows setting for Reference col in Table>Fields to generate as Reference>*.

SQL runs ok and data appears.

tablecol RV_BolDetails created
PF copy from BOLLines and manually create fields, save as CBOLLines
This time compiere is asking that for C_BOL_ID instead of the header_v_id. Fixed and it worked.

The final SQLs and XMLs are now in http://red1.org/barn/HutzlerCompiereUSA/sources/BOL.zip .

U can run them as
Code:
1) RUN XML2AD on the ADBOL.xml

2) go into SystemAdmin>Table&Column , look for C_BOL and synch just one field in there. Do the same for C_BOL_Line.

3) in your DB Editor, run the alterBOL.sql.

4) RUN GenerateModel 'A'

5) CVS for BOL_Generate.java or take it from the zip and place in your source.

6) SystemAdmin>Process&Report create a new process Generate BOL which has no parameters and classname is org.compiere.process.BOL_Generate.

7) RUN XML2AD on viewBOL

8) Login ClientAdmin. If the new window doesnt appear, goto ClientAdmin>Role - WindowAccess tab - new record>Window - select "Bill Of Lading"> Read/Write checked

9) RUN the sqls in DB editor

10) Create both TableColumns.
 > Copy from M_InOut_Header_v.
 > Change Table&Column record names to exact names C_BOL_Header_v and  RV_BOLDetails respectively.
 > Click on 'Create Columns from DB' button
Note from pop-up that fields are populated
> At the RV_BOLDetails table >column for 'Line' > place in Default Logic box - @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_BOL_Line WHERE C_Order_ID=@C_Order_ID@

11) Create PrintFormat (This is one way of doing it, but get the idea that we are now trying to get a same instance of the present PrintFormat but based on the new SQL tables.
>Login as SystemAdmin (Report & Process later requires your PF to be under System)
>Copy the Bill Of Lading PrintFormat
>Give a different name to avoid confusion: 'CBOL'
>CLick on 'Copy/Create' button
>Select Bill Of Lading (or your presently named BOL PrintFormat)
(its useless to change the Table name to C_BOL_Header_v just yet as system will revert back)
To change the Table to ours, we go into DB Editor and locate the AD_Table_ID of the latest table we just created.
Then locate the latest PrintFormat record, go to the column 'AD_Table' note that its '500'. Change that to your latest AD_Table_ID. Mine is 1000015.
(If your present PrintFormat is not under System u can then login as ClientAdmin, and create this PF, then change its AD_Client_ID to '0'in the DB Editor. Go to the AD_PrintFormat table and locate your record.)
>Do the same for Detail Print Format -

12) Adjust to the GIFs of the former BOL

13) Now we create a new Report&Process to house this PrintFormat.
>Create a new one called "RPT_BOL"
>Check 'Report' box
>In Print Format select your 'CBOL' PF

Do a cache reset if u do not see your new creation

14) Now call up Window Tab & Field, for your Bill Of Lading window.
At the Tab for main, select in Process list, your 'RPT_BOL'


Last edited by red1 on Sat Oct 29, 2005 7:14 pm; edited 1 time 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: Sat Oct 29, 2005 1:54 pm    Post subject: Reply with quote

To solve Import BOLComment

1) The field is too short. Its only 40 char in I_Bpartner.comments and 80 char in C_BPartner_Location.BOLComment, when your description is much longer. So..
a) adjust in SystemAdmin.Table&Column for the two tables. Set them to text
b) RUN GenModel 'D' and 'A'
c) adjust length in DB Editor for those two field lengths. Or delete those two fields and in SystemAdmin>Table&Column at those 2 fields 'synch columns'

2) Look for this snippet in ImportBPartnerBOLComment:
Code:
bpLoc.setBOLComment(bpLoc.getBOLComment() + "/n" + impBP.getComments());
Change the "/n" to "\n"
Back to top
View user's profile Send private message Send e-mail Visit poster's website
trifon
Senior


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

PostPosted: Sat Oct 29, 2005 5:45 pm    Post subject: Reply with quote

Sorry, it is my mistake,

but in my code source code is like this:

if (bpLoc.getBOLComment() == null) {
bpLoc.setBOLComment(impBP.getComments());
} else {
bpLoc.setBOLComment(bpLoc.getBOLComment() + "\n" + impBP.getComments());
}

Regards,
Trifon
_________________
Trifon Trifonov
Back to top
View user's profile Send private message Yahoo Messenger
red1
Site Admin


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

PostPosted: Sat Oct 29, 2005 6:52 pm    Post subject: Reply with quote

Trifon,
i cant find the above in the code u sent via email. Can u send it again to Rich and/or me?
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: Sun Oct 30, 2005 6:31 pm    Post subject: Reply with quote

After step 6 above we have to make the process appear in the Menu
a) SystemAdmin>Menu
b) Create new>Action - Process > Window> select your newly created Process.

What this BOL_Generate.java does is:

1) Examine each Order record and look for a common BOL No.
2) Merge the Orders' Lines into a BOL Detail file.
3) Mark each processed Order with a BOL_ID so that it wont be processed again.

So u have to create a new field BOLNO in the Table&Column > C_Order
Also create field C_BOL_ID (number).
Do a GenerateModel 'D' after it.


Last edited by red1 on Mon Oct 31, 2005 11:49 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Mon Oct 31, 2005 9:11 am    Post subject: Reply with quote

red1 wrote:
1) RUN XML2AD on the ADBOL.xml

I got the following errors:
===========> DB.executeUpdate: Update=UPDATE AD_Column SET AD_Reference_ID=0,Updated=TO_DATE('2005-10-30 20:03:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=1000464 [null]
java.sql.SQLException: ORA-02291: integrity constraint (COMPIERE.AD_REFERENCE_COLUMNDATATYPE) violated - parent key not found
; State=23000; ErrorCode=2291
===========> DB.saveError: DBExecuteError - ORA-02291: integrity constraint (COMPIERE.AD_REFERENCE_COLUMNDATATYPE) violated - parent key not found
===========> X_AD_Column.saveUpdate: AD_Column.AD_Column_ID=1000464
Back to top
View user's profile Send private message
red1
Site Admin


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

PostPosted: Mon Oct 31, 2005 9:33 am    Post subject: Reply with quote

I got these too. So ignore them. It may be due to the role setting that culdnt get thru and u have todo it manually as stated above.

Also, after running, check the physical tables from AD and see if the reference and other settings are normal. Use other tables presently in Compiere as reference. It shuld be intuitive.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Wed Nov 02, 2005 6:11 am    Post subject: Reply with quote

So as I test the BOL window, I have the following comments/questions:
1-When I try to save BOLLine, I get the following error:
ORA-01400: cannot insert NULL into ("COMPIERE"."C_BOL_LINE"."C_BOL_ID"). It's a mandatory field but it doesn't autopopulate. Also, C_BOL_LINE does not autopopulate (shouldn't it so that it can be sorted?). This is solved by lines in the view.xml such as <field name="C_BOL_ID" columnname="C_BOL_ID" isDisplayed="N" isSameLine="Y" />
<field name="C_BOL_Line_ID" columnname="C_BOL_Line_ID" isDisplayed="N" isSameLine="Y" />
which make them present but not seen. So u have to put them manually back into the window of both tabs, and then when its ok, make them not displayed. -red1


2-Instead of just copying (merging) the line items of the Sales Order, the BOL generate should "process" the line items and output into the BOL document (with the following fields): PackCode, quantity, & weight (as well as PackCode Description and Class - see below, but these can autopopulate off of a reference table). I know that you are going to say that this can be accomplished in the printformat/view, but the staff want what is in the BOL window to be what is printed out and be able to edit it. If it is done by a view, then it is not editable easily. If we make these changes the view will be a lot simpler (and will have to be changed obviously). This can be done in the BOL main tab (reversing the PrintView idea back to the window) too. Thus i will infused the BOL Main with the above during processing, in subtotals too, so that the PrintFormat can transfer them directly. -red1
3-We need a new table (PackCodes) that has the following fields: PackCode, Description, Class. Regardless of whether you do above item (2), we will need to reference (either during BOL_Generate or view) this table to get the details of each PackCode. We can do this as a separate independent tab too in the BOL window for quick reference. Otherwise we make it as a lookup that pulls from and put into the BOLLine together. - red1
4-In Bill Of Lading window, BOL tab, the following fields need to be fixed:
a-C_Bpartner_ID- I changed the reference of this field (in table&column) to search so that it would bring up a search window. The change works, but the search window (BP Info) has the "vendors" box checked so it only brings up vendors. How do I have it default so it brings up only customers or all BPs? It seems centrally controlled. I can either turn it off or set to customers for all cases.
b-Location_ID- this needs to populate when BP is chosen (if BOL is created manually) and/or during Generate. Will do that
c-Value- What is this field here for? We already have doc # field/
d-No. Packages- Is this a calculated field? If so can you also add a (calculated) field for total weight? see above, just give the rules we infuse into main tab during processing.
5-In Bill Of Lading window, BOLLine tab:
a-PackCode, Weight - Do these fields auto-populate during BOLGenerate? They should. FYI, Weight should be linetotal weight. Since each package can be a different weight, the total weight field is populated during generate or manually (if BOL is created manually). They do.
b-Name field is required. This should not be the case.. Its auto populated as the BOLNO. Name is a controlled field in Compiere.We can change its label to BOLNO later
6-Does BOLGenerate generate a BOL only if M_Shipper.PRINTBILLOFLADDING (should change field name so that LADDING only has 1 "d") = Y? Please make sure this is true. Will do that
7-Where does the BOLNO in Sales Order come from when it autopopulates (I assume it autopopulates - correct me if I am wrong)? From BOL doc #? If not BOL doc #, then where and how do I change the BOL sequence? If yes, does it reserve the BOL doc # in the case that I manually create a BOL so that it doesn't duplicate the doc #? I tried to test in GardenWorld, by "requested doc type" was required, but there was nothing to select for some strange reason, though this wasn't the case in Hutzler (but I didn't want to test in live DB). I have no rules on BOLNO yet. Its manually entered, not auto. Give two SOs the same BOLNO and they will merge. If this is not the whole rule-set, then give me the rules and i will program them.
Thanks,
Rich
Back to top
View user's profile Send private message
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Thu Nov 03, 2005 5:30 am    Post subject: Reply with quote

riche wrote:
So as I test the BOL window, I have the following comments/questions:
1-When I try to save BOLLine, I get the following error:
ORA-01400: cannot insert NULL into ("COMPIERE"."C_BOL_LINE"."C_BOL_ID"). It's a mandatory field but it doesn't autopopulate. Also, C_BOL_LINE does not autopopulate (shouldn't it so that it can be sorted?). This is solved by lines in the view.xml such as <field name="C_BOL_ID" columnname="C_BOL_ID" isDisplayed="N" isSameLine="Y" />
<field name="C_BOL_Line_ID" columnname="C_BOL_Line_ID" isDisplayed="N" isSameLine="Y" />
which make them present but not seen. So u have to put them manually back into the window of both tabs, and then when its ok, make them not displayed. -red1


This is unclear to me. Is this an answer? You are saying the solution is in the XML but that has already been run and we are having this problem. These fields should have values in them and they are not being populated and C_BOL_LINE is a required field
riche wrote:

3-We need a new table (PackCodes) that has the following fields: PackCode, Description, Class. Regardless of whether you do above item (2), we will need to reference (either during BOL_Generate or view) this table to get the details of each PackCode. We can do this as a separate independent tab too in the BOL window for quick reference. Otherwise we make it as a lookup that pulls from and put into the BOLLine together. - red1

Yes, it should be a lookup that is used to populate the values when putting the BOLLines together. I will elaborate when I describe the processing.
riche wrote:

a-C_Bpartner_ID- I changed the reference of this field (in table&column) to search so that it would bring up a search window. The change works, but the search window (BP Info) has the "vendors" box checked so it only brings up vendors. How do I have it default so it brings up only customers or all BPs? It seems centrally controlled. I can either turn it off or set to customers for all cases.

Actually, I just discovered the you need to check the "Sales Transaction" box in the Window, Tab, & Field.

Thanks,
Rich[/quote]
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 Nov 03, 2005 7:57 am    Post subject: Reply with quote

On the first item it shuld work like u said. Anyway to get a better understanding just do the following (1) and the next (2) later when it worked.

1) Make the IDs appear in your tabs. i.e. C_BOL_ID for Main, and C_BOL_ID and C_BOL_Line_ID in Detail tab.

>U can examine them also in the Sequence tab of AD-Window whether these appear in the left hand side before this (after running the view.xml).
If they do then they are in the system (but not been displayed) and thus wont be considered missing. If they didnt, then the XML2Ad didnt work as shuld in yours.

2) When things work fine, u can check the IsDisplayed box so that they dont appear. If u wish to leave them alone its also ok. I was just following the other compeire display conventions.

>>>
Now about the BOL PackCode subtotals, i think we can try an almost exact fit for the PrintFormat:
A) Make the subtotals append as extra detail lines. The grandtotal as a final line. The description field of the line will carry the words "PACK CODE SUBTOTAL for 'K' OR 'C'" and "GrandTotal" respectively.

B) We use callouts to allow any edit to the detail lines to affect the totalings. No edit shuld be allowed to the totalling lines.

C) Can u confirm that there will be only two pack codes 'K' and 'C'?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Thu Nov 03, 2005 1:47 pm    Post subject: Reply with quote

red1 wrote:

Now about the BOL PackCode subtotals, i think we can try an almost exact fit for the PrintFormat:
A) Make the subtotals append as extra detail lines. The grandtotal as a final line. The description field of the line will carry the words "PACK CODE SUBTOTAL for 'K' OR 'C'" and "GrandTotal" respectively.

B) We use callouts to allow any edit to the detail lines to affect the totalings. No edit shuld be allowed to the totalling lines.

C) Can u confirm that there will be only two pack codes 'K' and 'C'?

A couple of comments to clarify:
1-Do you realize that I only need the subtotals (and total). The detail lines are NOT used in the BOL at all. I don't think it's necessary copy the detail lines to the BOL and then subtotal. I think the best way (to generate the BOL) would be to do the following:
a-query to see if the BOL exists with the BOLNO identified in the SO; if the BOLNO doesn't exist, then create it (with appropriate BOL header values)
b-then go line by line in the Sales Order:
-Calculate the quantity and weight for the product, identify it's pack code
-query the BOLNO for the packcode
-if a BOL line exists with the packcode, then add the quantity and weight to that line (since we just want subtotals); if there is not line with the packcode, create it, populate the pack code description and rate from the lookup table, then add the quantity and weight
-update the total package count and weight on the BOL header

The benefit of this is that it would be very easy to append lines from multiple SO to a single BOL

2-We will be adding more PackCodes (in addition to K & C) so the logic should allow for this. I think a lookup table would be the best place to store this info anyway

3-I would like to eventually using Doc # from a new doc type to control the BOL numbers, but I haven't completely figured out the logic. Do you think this is possible? Can you explore a little, such as: creating a new Doc Base Type, if we can use a callout from a salesorder to populate a doc # for the BOL field (maybe through a button), and maybe also create the BOL header during SO creation while doing the processing of the lines during the generate BOL process. I know it sounds a little confusing, but I have to work out the logic a little more. The point is I would (eventually, not immediately because we can do it manually until we figure out how it should work) like compiere to automatically manage the BOL # the same way it handle other document sequences. The challenge is that, we are creating the BOL# before we generate the rest of the BOL. That's why I thought maybe generating a "placeholder" BOL when we grab the BOL#. If this doesn't make sense, I will describe next time you are online, do let me know when that might be.

Thanks,
Rich
Back to top
View user's profile Send private message
red1
Site Admin


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

PostPosted: Sat Nov 05, 2005 10:49 am    Post subject: Reply with quote

I have read your post on BOL and will try to iterate in pieces until i digest it in its entirety. Meanwhile i m heading North tomorrow for a planned 4 days.

I may online tonite my time to respond further on what i can to the BOL.

riche wrote:
3-I would like to eventually using Doc # from a new doc type to control the BOL numbers, but I haven't completely figured out the logic. Do you think this is possible?
Ok, to feed u on this, the record no sequencing is somewhat present in the system, i.e. in Document Sequence u can find C_BOL and C_BOL_Line there as a running number when BOL records are created. So we might use that to populate the BOLNO field. However BOLNO has to exist prior in SO and thus that has to be housed in a routine to call up at will when we need them, which isnt persently handled in Compiere's scheme of things.
But i tot BOLNO is a match4merging number, where we just id some SOs to have a similar BOLNO so that they go into one BOL so to speak. Thus if u meant them to be generated, then does that mean u will manually match them? And how? Hmm, could i be up the wrong tree here? Ok... will check back whenever i can later.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
riche
Senior


Joined: 16 Dec 2004
Posts: 386

PostPosted: Mon Nov 07, 2005 2:29 pm    Post subject: Reply with quote

So you bring up a key point here, which is that BOL No is in fact used for matching order/BOLs together, but it is also used to identify the BOL No (that will be merged). It would work as following:
1-Order is entered, BOL No field is autopopulated.
2-When 2nd order (which should merge BOL), BOL No field is edited with BOL No from other Sales Order that will be matched.

Now if this get's too complicated (using a field in Sales Order for both BOL doc # and matching field), perhaps I can suggest an alternative. Perhaps we just try to accomplish 1 function (in this field(s) - whatever we call it) which would be the matching function. This way we don't have to worry about autogenerating the doc number. I know this is what you were originally thinking. In this case, I suggest we use 2 (new) fields:
1-Order Match - enter the order # for the other sales orders to merge BOLs with OR a unique identifier to look for in other orders
2- a checkbox which called "merge BOL" and then just merge BOLs based on the Order Matching field

Let me know your preference. I will check with Ed on how he would like an order matching field to work.

-Rich
Back to top
View user's profile Send private message
red1
Site Admin


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

PostPosted: Sat Nov 12, 2005 12:10 pm    Post subject: Reply with quote

riche wrote:
but the staff want what is in the BOL window to be what is printed out and be able to edit it. If it is done by a view, then it is not editable easily.
I like some more background and context info on kind of editing that goes on in the BOL. Examples will give me a good visual.
As i know this new tab of packcode info will just be a derived information and thus i wonder what further information is needed on it or needed to be edited. Then i can make it smarter or make changes easier wheneve u want it as we go along.

About the unifying BOLNO, i was thinking that it be used as manually entered code into the Orders. For example, if we put 'X' in the BOLNO of Order A and Order C, then both these Orders will be merged into one BOL record. Thus no 3rd party generate or dependancy of the BOLNO occurs.
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: Sun Nov 13, 2005 1:32 pm    Post subject: Reply with quote

I have done the PackCode sub-totalling Tab and Process. Next i will do the PrintFormat adjusting, and post the files and steps.

>>>>>>>>> They are now in http://red1.org/barn/HutzlerCompiereUSA/sources/BOLPack.zip .

For the CBOLPackV.sql u can see the fields now in used
Code:

CREATE OR REPLACE VIEW RV_CBOLPACK ( AD_CLIENT_ID,
AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY,
UPDATED, UPDATEDBY, C_BOL_ID, DOCUMENTNO,
DESCRIPTION, C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, FREIGHTCOSTRULE,
M_SHIPPER_ID, NOPACKAGES, QUANTITY,
PACKC, WHSLC, TOTWEIGHT
 ) AS SELECT
h.AD_Client_ID, h.AD_Org_ID, p.IsActive, p.Created, p.CreatedBy, p.Updated, p.UpdatedBy,
  p.C_BOL_ID, h.DocumentNo, h.Description, h.C_BPartner_ID, h.C_BPartner_Location_ID,
  h.FreightCostRule, h.M_Shipper_ID, h.NoPackages, 
  p.TotalQty, p.PACKC, p.WHSLC, p.TotWeight
FROM C_BOL h
  INNER JOIN C_BOL_Pack p ON (h.C_BOL_ID=p.C_BOL_ID)

U need to create a Table/Column for this RV_CBOLPack as we did the last time. Then adjust the PrintFormat to refer to this View Table and adjust to its fields.

I have also synched to CVS: MBOLPack.java and BOL_Generate.java


Last edited by red1 on Thu Dec 29, 2005 12:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail 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 -> International US Trading All times are GMT + 8 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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