make bill in form builder [message #378044] |
Sun, 28 December 2008 02:28 |
CLS63AMGV8
Messages: 11 Registered: November 2008 Location: Oman
|
Junior Member |
|
|
hi all
I want to make bill for guest reservation in this layout form
guest_id __________________
full_name _________________
room.no | room_desc | room_rate | nights | total |
____________________________-
i have these tables
guest,booking,room, room_type.
table guest contains of (g_id pk, f_name, s_name etc)
table booking contains of (b_id pk, g_id fk, date_from, date_to)
table room contains of (room_no pk, b_id fk, room_tc fk, r_floor)
table room_type contains of (room_tc pk, room_desc, room_rate)
______________________________________________________________
how to clculate nights and total acount?
and how to create view for this form?
________________
these all table on zip
[Updated on: Sun, 28 December 2008 02:57] Report message to a moderator
|
|
|
Re: make bill in form builder [message #378740 is a reply to message #378044] |
Thu, 01 January 2009 01:48 |
|
Hi,
You should try it by yourself first and then let us suggest to you. There are some basic function you can use to calculate the COUNT and SUM. Below i am sending you a sample View that i have created for my report which contains all the information you need to proceed. try it by yourself first and then ask for Help. Hope you understand what does it mean!!
CREATE OR REPLACE VIEW DO_DCMBL.DEALER_ACHIEVEMENT
(DISTRIBUTOR_CODE, PRODUCT_CODE, MONTH_ID, YEAR, PRODUCT_QUANTITY,
SALES_AMOUNT)
AS
SELECT ALL MASTER_SALES_Tbl.Distributor_Code, MASTER_SALES_Tbl.Product_Code, MASTER_SALES_Tbl.Month_Id,
MASTER_SALES_Tbl.Year,SUM(MASTER_SALES_Tbl.Product_Quantity) PRODUCT_qUANTITY,
Sum(MASTER_SALES_Tbl.Sales_Amount) SALES_AMOUNT FROM MASTER_SALES_TBL
GROUP BY DISTRIBUTOR_CODE,PRODUCT_CODE,MONTH_ID,YEAR;
Let me know your progress.
|
|
|