restau_m1.php

#### pro 1: confirm_login_PRO()

Confirm login, call make_session().

##### make_session

Fill session data: OPERID, AGENTID, OPE_NAME, LPATH, TITLE

#### meta 1: start_order()

Clear ORDERDID. Request reseller login info (RESELID and PASSWD). Next function=2.

#### meta 2: confirm_reseller()

Verify reseller. Fill session data: RESELID, RE_NAME, WHAREHOUSEID. Call request_customer().

##### request_customer()

Request LOGIN name for customer/table. Next function=3.

#### meta 3: confirm_customer()

Verify customer/table, call $ce->set_customer(): set session data LOGIN, COMPANY, PRLISTNO, EMAIL, XDBID.

#### pro 20: logout_PRO()

Call clear_session().

Internal Function area

#### remake_fullprice($ce,$ordline=false)

Called from pay_order_PRO(), ih_order_PRO(), issue_order_PRO() and other(?);

If $ordline is not set, it refers to the whole order.

#### update_fullprice($ce,$rec)

Called from remake_fullprice()

$rec must contain SUBID=0, FULLPRICE, ORDLINE

Order status

#### order_main

##### order_main.STATE

- 9999 = Temp.
- 4 = Done (executed): check order_line
- 9 = Prt (officialy printed): check order_line
- 10 = Anz (analysis printed): check order_line
- 110, 111, 112 = Fully executed (payed)

#### order_line

##### order_line.STATE > 0 + order_line.PRINTED:

- 0 = Executed (only)
- 1 = Officialy printed