Suvienay
|
| Posted: 04/20/2005, 6:23 AM |
|
hi,
I am trying out ccs.
In the orderentry example in the ccsexample pack, i want to modify the order_items part (where we choose the products and add them to the order) so that when we submit the order, it is first checked if the items exist in the inventory and if yes then it is executed (both product name and quantity are checked)
A seperate table is created in the db which contains the fields,
id - primary unique auto
product_id
product_quantity
product_batch
I have added a batch field while filling the order, I want to modify the scripts so that when the user submits the form, the form automatically checks the quantity ordered, from which batch it is ordered. If they exist then order is executed, else error message goes through.
How do I do this with ccs?
Basically its validating the products chosen, quantity and batch number with the values stored in a table and if exists (matches and quantity is less or equal, order is executed)
Thanks
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 04/21/2005, 2:14 AM |
|
Hello,
Record and editable grid forms has special onValidate event where you need to locate your validation code. The exact calculation depends on your needs, but as batch is stored in a different table you need to look up that value from a table using CCDLookUp(), then subtract values and depending on it assign custom error to a form.
The following links from Help could be helpful http://docs.codecharge.com/studio/html/index.html?http:...tomSQL.html?toc
http://docs.codecharge.com/studio/html/ProgrammingTechn...dation.html?toc
http://docs.codecharge.com/studio/html/index.html?http:...dation.html?toc
_________________
Regards,
Nicole |
 |
 |
|