Hello! I need some help on my program... I am making a program which is about a certain shop, with 3 records which is : Stock records, Employee records, and Customer records. I have already made procedures on each of this records which is, add, view, list, delete, search, sort, modify, backup, and restore. Each record in 3 menu's "Stocks, Employee, and Customer.."
My problem is that... my teacher ask me to make my program do some real programing like computing and stuff or external sort i think it was he said.. But I choose to add another program which is called receipt
where I add new procedure called receipt. where the user will ask for the customer's ID, then its name will display on the screen.
([u]Using seek and read from customerfile[/u].) after that the user will ask which item number of the stockfile the customer pick([u]again using seek and read from stockfile[/u]) then the info of the stock item will be displayed on the screen (from stock records) along with the name of the customer(from the customer record). It will then ask how many? then multiply the total and receive the payment and calculate the change... <-- which is a new var in this procedure.
Now what I want is after making another menu for this procedure, called receipt. I want to copy all the information above to this new record/a 4th record where it will store the info on which customer, what items he bought and how many he bought, total and change..
so that in the sub menu I could use the procedure which displays the customers recent transaction. But I dont know how to copy a certain file on the 2 record files which is stock and customer in order to save it to the new record called receipt.
var which_customer_num: integer;
write('Customer number #: ');
while not eof(customerfile) do
if (customer.status='A') AND (which_customer_num=customer.customnumber) then
writeln('CUSTOMER NAME: ',customer.forename,' ',customer.surname);
while which_stock_num <>0 do
write('Item number : ');
gotoxy(25,13);write('STOCK TYPE ');
while not eof(stockfile) do
if (stock.status='I') AND (which_stock_num=stock.stocknumber) then