This topic is locked

Master Detail Relation to Order Table

10/2/2010 6:19:42 AM
PHPRunner General questions
A
arunabh author

Hello,
I have a master detail form for sale invoice. The same type of master detail I have for order. There are items in order. I create order. It is fine. When I go on for entering invoice against order in the invoice detail table I have orderlink. I want to select order in list item only of the customer I selected in the master of invoice and so the items from that order only in the detail of invoice while entering invoice.
How can this be done in PHPR

Sergey Kornilov admin 10/2/2010

You need to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. We need this info to provide a meaningful advise.

A
arunabh author 10/27/2010



You need to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. We need this info to provide a meaningful advise.



Sir,
I will give you table structure for your information.
ordermaster

co int PK

code char(2) PK

docno int PK

docdate datetime PK

customerid int PK

ordernumber
orderdetail

co int FK to ordermaster

code char(2) FK to ordermaster

docno int FK to ordermaster

docdate datetime FK to ordermaster

customerid int FK to ordermaster

itemcd int
salemaster

co int PK

code char(2) PK

docno int PK

docdate datetime PK

customerid int PK
saledetail

co int FK to salemaster

code char(2) FK to salemaster

docno int FK to salemaster

docdate datetime FK to salemaster

customerid int FK to salemaster

orderlink int FK to orderdetail(docno)

itemcd int

qty int

rate decimal(10,2)
itemmaster

co int

itemcd int

itemname varchar(50)
now when i go in saledetail for entering invoice i should select ordernumber column from ordermaster for that customer, pick the document no(docno) column and save in orderlink column of table saledetail.
when i select order of that customer only, itemcd column will show part names (itemname) column of that order only from itemmaster.
I think I have put in simplest form. Serjey, please help.

A
arunabh author 10/28/2010



Sir,
I will give you table structure for your information.
ordermaster

co int PK

code char(2) PK

docno int PK

docdate datetime PK

customerid int PK

ordernumber
orderdetail

co int FK to ordermaster

code char(2) FK to ordermaster

docno int FK to ordermaster

docdate datetime FK to ordermaster

customerid int FK to ordermaster

itemcd int
salemaster

co int PK

code char(2) PK

docno int PK

docdate datetime PK

customerid int PK
saledetail

co int FK to salemaster

code char(2) FK to salemaster

docno int FK to salemaster

docdate datetime FK to salemaster

customerid int FK to salemaster

orderlink int FK to orderdetail(docno)

itemcd int

qty int

rate decimal(10,2)
itemmaster

co int

itemcd int

itemname varchar(50)
now when i go in saledetail for entering invoice i should select ordernumber column from ordermaster for that customer, pick the document no(docno) column and save in orderlink column of table saledetail.
when i select order of that customer only, itemcd column will show part names (itemname) column of that order only from itemmaster.
I think I have put in simplest form. Serjey, please help.


I think I have put it in simplest form and have tried several of the lookup options and i have to struggle very hard. Most of the peoples in this forum are
Phprunner is very weak in lookup especially I would recommend it should be query based, there should be an option to select a query and link columns of that query to the current cell. The tables should be block based and every cell should be accessable by something like block.cellname. It is also weak in cell based events whereas sqlmaestro php generator is very strong on that part.
I would recommend you to have a look at sqlmaestro php generator, you may get a feel of what I want to say.