Topic: CAN ?

po_entry_items.php?ModifyOrderNumber=""

Under this page ,,  can any one guide how i can specially use that Order Item section code .. 

as it seem to easy .. i means to say its easy at one place all thing is done add and edit.

please tell me

Re: CAN ?

sorry i didnt understand your question? can you be more explicite?
what section you dont undrestand? what's your objective? what do you intend to do?

abdelghani

Re: CAN ?

Dude ,

If you visit Purchase  >>  Purchase Order Entry
purchasing/po_entry_items.php?NewOrder=Yes

or

Purchase  >>  Purchase Orders Inquiry
purchasing/po_entry_items.php?ModifyOrderNumber=

there is Order Items under this ,  want help of code which is auto increment with Add new button, hence at one place user can edit delete and add new with auto increment .

Which is simple to use.

Hence i need help of this place , can you or any one make a single page with this much code ?

Re: CAN ?

you just need to read the code , the first 50 lines;

if (isset($_GET['ModifyOrderNumber']) && is_numeric($_GET['ModifyOrderNumber'])) {

    $_SESSION['page_title'] = _($help_context = "Modify Purchase Order #") . $_GET['ModifyOrderNumber'];
    create_new_po(ST_PURCHORDER, $_GET['ModifyOrderNumber']);
    copy_from_cart();
} elseif (isset($_GET['NewOrder'])) {

    $_SESSION['page_title'] = _($help_context = "Purchase Order Entry");
    create_new_po(ST_PURCHORDER, 0);
    copy_from_cart();
} elseif (isset($_GET['NewGRN'])) {

    $_SESSION['page_title'] = _($help_context = "Direct GRN Entry");
    create_new_po(ST_SUPPRECEIVE, 0);
    copy_from_cart();
} elseif (isset($_GET['NewInvoice'])) {

    $_SESSION['page_title'] = _($help_context = "Direct Purchase Invoice Entry");
    create_new_po(ST_SUPPINVOICE, 0);
    copy_from_cart();
}

it's a pattern-like: isset($_GET['NewOrder']) tests what is sent next to the url po_entry_items.php?NewInvoice,
if it's true, the code calls the function create_new_po(ST_SUPPINVOICE, 0); which create a purch_order object (see po_class.inc). this class can define three type : order/grn/invoice by changing the $trans_type value.
ST_SUPPINVOICE is defined at the beginning (see set_page_security).
the object display is handled by display_po_items() and display_po_header() which display the $_SESSION['PO'] or $cart based on the value of $trans_type.

ps: @FA_developpers, please use braces when using "if () statement", i have  a hard time reading the code.....

abdelghani

Re: CAN ?

ostertagi , thanks dude, what you had explain above . i have already research on it ...

thing is that after visiting po_class.inc file,, the coding format is too complicated .. franking its totally out of my head ..

hence i ask for a single page help from u all side