Question: i have these tabels in database system , in table employee i have discount_allowed , i want to creat a function to calculate the discount

i have these tabels in database system , in table employee i have discount_allowed , i want to creat a function to calculate the discount allowed in oracle apex /using pl , sql
i have these tabels in database system , in table employee i
have discount_allowed , i want to creat a function to calculate the

\begin{tabular}{l} \hline RepairJob \\ \hline JobNum (PK) \\ \hline DateReceived \\ \hline DateToReturn \\ \hline DateRetumed \\ \hline DateStarted \\ \hline DateFinded \\ \hline RepairDetails \\ \hline LaborDetails \\ \hline LaborCoat \\ \hline TotalCost \\ \hline RaydinFull \\ \hline AdditionalComments \\ \hline hotrs \\ \hline \end{tabular} \begin{tabular}{|l|} \hline Mobiles \\ \hline Mobld (PK) \\ \hline ScrialNum \\ \hline Make \\ \hline Model \\ \hline MobDescription \\ \hline \end{tabular} \begin{tabular}{|l|} \hline Items \\ \hline Itemld (PK) \\ \hline PartNum \\ \hline ShorrNarne \\ \hline liemDescription \\ \hline Cost \\ \hline NumlnStock \\ \hline Reorderlow \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline Employee & Customers \\ \hline Empld(PK) & CustomerCPR(PK) \\ \hline LastNime \\ \hline LastName & FirstName \\ \hline FirstName & MI \\ \hline MI & Email \\ \hline Email & MobTel \\ \hline MobTelNo- & Hometel \\ \hline HomeTel & HouseNo \\ \hline Extension & RoadNo \\ \hline Hogrlysalary & BlockNo \\ \hline discountallowed & City \\ \hline \end{tabular} System userx: - Cost: This function calculates the total cost for service. This cost is calculated from employees salary for the repair work, from cost for set of used parts and from cost for service itself. Formula for calculating: finalCost- hours* salary tparts Cost where hours................ time repair in hours (allows fractions) salary. employee salary per hour partsCost...........cost for set of used parts - Calculate discount: This function calculates the amount of discount to be given to the customer based on discount percentage and cost of service calculated earlier

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!