Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
\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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started