Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

PL/SQL using SQL COMMANDS please leave it if you don't have an answer The system must contain tables such as Items(itemNo,ItemName,Price,total_quantity, catNo) Invoice (employeeNo, customerNo,

PL/SQL using SQL COMMANDS
please leave it if you don't have an answer
image text in transcribed
The system must contain tables such as Items(itemNo,ItemName,Price,total_quantity, catNo) Invoice (employeeNo, customerNo, total price invoiceNo, InvoiceDate, branchNo) InvgicePeatail (invoiceNo,ItemNo, paidPrice, quantity) . create getitemTotalPrice function which to return quantity*paidPrice . procedure to add Invoice detail AddlnyoiceReatail(inugiceNojtemoName,quantity). This method start by validating the existing of the current invoiceNO by call function checkExistinginvoice(invoiceNo1) so if this invoice exists then we will start checking the existing of item name by call getitemNo(itemName1) which will return itemNo if the item name is exists else it will return - 1 if this item not exists in items then if exists we call getltemPrice(itemNo1) function to return item price. After that if invoiceNo and ItemNO valid and exists before then the procedure will check the existsiog if itemno of this invoiceNO not exists before by call checkExistinginvoiceltem(inyoiceNo1.jtemNo1) so this itemNo will be added to this invoiceNO in table InyoiceDeatail and the transaction related to adding this record as follow: New record contain invoiceNo with i itemNerpaidrrice, and quantity it will be added to Inyoicedeatail table then The total price for this invoice it will be increased by using this formula (quantity* price ) related to current item then the total price of invoice it will be increase, after that the item total quantity in items table will be decrease for this itemNO related to this itemNO in InvgiceDeatail. but if this itemNo exists before in this InvoiceNo then instead of insert new cecorde with the new quantity in Inyoicedeatail table then the quantity it will be updated in for that item added before and the rest of logic related to increase the invoice total price and decrease item quantity from items table it's the same scenario of added new items, the system will display a message that one item :item name has been added successfully else the message will display there is no item has this name: parameter item name. -DON'T ANSWER IF YOU DON'T HAVE COMPLETE AND CORRECT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students explore these related Databases questions