Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

procedure to remove item from customer invoice removeInvoiceItem(invoiceNo, itemName) where this method will firstly call getItemNo(itemNAme) method which it will return item no if exists

procedure to remove item from customer invoice removeInvoiceItem(invoiceNo, itemName) where this method will firstly call getItemNo(itemNAme) method which it will return item no if exists else it will return -1 if not exists . After that the procedure will call function

checkExistingInvoiceItem(invoiceNo,itemNo) which will return exists if this item was sell in this invoice or not exists if not was sell. After that the procedure will call getitemInvoiceQuantity(invoiceNo,itemNo) , getitemInvoicepaidprice(invoiceNo,itemNo) for existing item in this invoice , then this function it will return the quantity for this item was sell to customer in this invoice then the procedure will increase the total_quantity for this item in items table ,then it will decrease the total price related to this invoice by this formula {total price =total price (quantity*price)} , after that then the item invoice record it will be deleted from InvoiceDeatail table related to this invoice item and message one record deleted successfully will be display to the user .

help me solve this with pl/sql code

i want the procedure as well as the functions getitemInvoiceQuantity(invoiceNo,itemNo) , getitemInvoicepaidprice(invoiceNo,itemNo) in pl/sql

the rest of the functions i already have

very many thanks

tables:

category(catNo ,catogeryName) ,Items(itemNo,ItemName,Price,total_quantity, catNo), Items_stor_entry(entry_no number primary key,itemNo,entry_date ,quantity),

Employee (employeeNo,employeeName,job) ,branch(No,Name), Customer(customerNo,costomerName,gender) ,

,Invoice (employeeNo,customerNo,total price ,invoiceNo,InvoiceDate,branchNo )

InvoiceDeatail contain List Of Purchase Items contain detail information related to the invoice (invoiceNo,ItemNo, paidPrice, quantity) . create getItemTotalPrice function which to return quantity*paidPrice .

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

Step: 3

blur-text-image

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

How is social networking used in informal training?

Answered: 1 week ago

Question

What are some career development methods?

Answered: 1 week ago