Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_site_server thread: purchase approval


Message #1 by "speedguru" <speedguru@m...> on Fri, 27 Jul 2001 11:21:41
I'm not fully conversant with entire Commerce Object Model and i'm 

working with a pre-written Purchase Approval module 

(xt_purchase_approval) which involves approving,updating,rejecting 

purchases made by an employee by his manager.


All purchases pending approval are shown alongwith checkboxes. 

In my case, I want the unchecked purchases to be shown back again as  

the manager may make each approval at different times. This in effect 

means, the unchecked purchase orders have to be retained in the BASKET 	

table, so that I can show it again to the Approving authority whenever 

he comes back. 

I believe the basic idea is that checked purchases are transffered from 

the BASKET table to the RECEIPT table. Once the order is created & 

stored in receipt, the Pending field in BASKET which is set to the 

authority_id changes to null. 

for implementing this 
1)i'm using an OrderForm derived from a DBStorage object based on 

Basket table ,
2) finding out which purchases have been checked using hidden form 

variables and  ONLY storing the checked ones & deleting the unchecked 

ones. 
3)using this orderform to store data into the RECEIPT table.

The issue now is ,I MUST NOT ACTUALLY BE DELETING THE UNCHECKED 

PURCHASES AS THEY NEED TO BE SHOWN BACK AGAIN. I have no idea how to 

store the purchases still pending approval. 

I tried creating 2 orderform objects both set to the Basket table..one 

holding the checked purchases and the other holding the unchecked 

purchases. After the first orderform info was saved to the Receipt 

table,using the second order form, i manually set the Pending field to 

the authority_id instead of null. This was properly set which i checked 

by viewing the Basket table. But the problem is the purchases still 

pending approval..i.e the unchecked ones, are not showing up at all 

which probably means they were not properly stored in the second order 

form and subsequently the marshalled_basket, at all.


if a user submits 5 purchase orders for approval and after the Manager 

approves 3, 2 must be shown back again on the approvaldetail pg. Due to 

the code (which is obviously incorrect ) that I've written I'm 

redirected to the page but no records are shown.


I hope all that i've written makes sense...


I seek (urgent...i'm racing against time ) advice on how to accomplish 

this. Can i find any online examples with the exact scenario.


I scoured the Net & found only siteserver101.com to have understandable 

stuff. Does anybody know of any other good resources , even remotely 

related.

thanks for your time,
:-)rk

  Return to Index