-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.txt
More file actions
74 lines (74 loc) · 9.07 KB
/
sql.txt
File metadata and controls
74 lines (74 loc) · 9.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
INSERT INTO dealer(registration_date,first_name,middle_name,last_name,gender,birthday,civil_status,nationality,address,email_address,contact_number,occupation,credit_limit,available_credit,max_return_days,sponsor,balance,due_date,total_penalty) VALUES(STR_TO_DATE('2018-06-25','%Y-%m-%d'),'Rochie','','Yamit',15,STR_TO_DATE('1997-06-01','%Y-%m-%d'),91,'','panabo','','0654','',1500,1500,20,'',0,37,0)
INSERT INTO supplier(supplier_name,contact_number,contact_person,discount) VALUES('Nike','54654654','manuel',20)
INSERT INTO category(category_name,category_type) VALUES('Shoes',16)
INSERT INTO product_color(color_code,color_name) VALUES('WHT','White')
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',1,'Lebron 2018',1,'9',1,STR_TO_DATE('2018-06-25','%Y-%m-%d'),3250,0)
INSERT INTO supplier(supplier_name,contact_number,contact_person,discount) VALUES('Adidas','69','Manuel',15)
INSERT INTO dealer_supplier_bridge(supplierID,discount,dealerID) VALUES(2,15,1);
INSERT INTO dealer(registration_date,first_name,middle_name,last_name,gender,birthday,civil_status,nationality,address,email_address,contact_number,occupation,credit_limit,available_credit,max_return_days,sponsor,balance,due_date,total_penalty) VALUES(STR_TO_DATE('2018-07-02','%Y-%m-%d'),'Rochie','Cañete','Yamit',15,STR_TO_DATE('1990-01-18','%Y-%m-%d'),91,'','panabo city','','09056618628','',1500,1500,30,'',0,37,0)
INSERT INTO supplier(supplier_name,contact_number,contact_person,discount) VALUES('Nike','091111111','Manuel',10)
INSERT INTO dealer_supplier_bridge(supplierID,discount,dealerID) VALUES(1,10,1);
INSERT INTO supplier(supplier_name,contact_number,contact_person,discount) VALUES('Natasha','Sir jorge','094545',25)
INSERT INTO dealer_supplier_bridge(supplierID,discount,dealerID) VALUES(2,25,1);
INSERT INTO category(category_name,category_type) VALUES('Men Shoes',16)
INSERT INTO product_color(color_code,color_name) VALUES('Blk','Black')
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',2,'Roberto',1,'5',1,STR_TO_DATE('2018-07-02','%Y-%m-%d'),1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',2,'Roberto',1,'6',1,STR_TO_DATE('2018-07-02','%Y-%m-%d'),1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',2,'Roberto',1,'7',1,STR_TO_DATE('2018-07-02','%Y-%m-%d'),1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',2,'Roberto',1,'8',1,STR_TO_DATE('2018-07-02','%Y-%m-%d'),1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,expiration,selling_price,quantity) VALUES('123456789',2,'Roberto',1,'9',1,STR_TO_DATE('2018-07-02','%Y-%m-%d'),1500,0)
INSERT INTO invoice_supplier(supplier_SOno,date_of_order,date_of_purchase,balance) VALUES('123456',STR_TO_DATE('2018-07-02','%Y-%m-%d'),STR_TO_DATE('2018-07-02','%Y-%m-%d'),0)
UPDATE product SET quantity=5 WHERE barcode='123456789'
INSERT purchase_order_supplier(productID,productName,quantity,salesOrderNo) VALUES(5,'Roberto',5,1)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'Inventory IN',1,'Good Condition')
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('12345',2,'Roberta',1,'7',1,123,0)
INSERT INTO invoice_supplier(supplier_SOno,date_of_order,date_of_purchase,balance) VALUES('12',STR_TO_DATE('2018-07-02','%Y-%m-%d'),STR_TO_DATE('2018-07-02','%Y-%m-%d'),0)
UPDATE product SET quantity=5 WHERE barcode='12345'
INSERT purchase_order_supplier(productID,productName,quantity,salesOrderNo) VALUES(6,'Roberta',5,2)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'Inventory IN',2,'Good Condition')
INSERT INTO invoice(payment_type,date_of_transaction,amount_paid,total_net) VALUES(234,(SELECT CURDATE()),400.0,369.0)
UPDATE product SET quantity=2 WHERE barcode='12345'
INSERT INTO purchase_order_list(idinvoice,item_code,item_name,quantity,unit_price,discount_percent,discounted_price,total_price) VALUES(1,6,'Roberta',3,123.0,0,123.0,369.0)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'Sales Order',1,'Cash')
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('777',1,'test ni',1,'1',1,1234,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('777',1,'test ni',1,'2',1,1234,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('777',1,'test ni',1,'3',1,1234,0)
INSERT INTO category(category_name,category_type) VALUES('Food',15)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('55',2,'ROberto ver2',1,'5',1,1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('55',2,'ROberto ver2',1,'6',1,1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('55',2,'ROberto ver2',1,'7',1,1500,0)
INSERT INTO product(barcode,supplier,product_name,category,product_size,product_color,selling_price,quantity) VALUES('55',2,'ROberto ver2',1,'8',1,1500,0)
INSERT INTO return_history(return_date,customer_name,return_reason,refund,invoiceID) VALUES((SELECT CURDATE()),'','Damaged',0.0,0)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'RETURN',0,'Damaged')
UPDATE purchase_order_list SET quantity=2,refund=123.0 WHERE item_code=6 AND idinvoice=1
INSERT INTO return_list(transactNo,idproduct,total_net,returned_quantity) VALUES(1,6,123.0,1)
UPDATE invoice SET total_refund=123.00 WHERE idinvoice=1
INSERT INTO return_history(return_date,customer_name,return_reason,refund,invoiceID) VALUES((SELECT CURDATE()),'','Damaged',0.0,0)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'RETURN',0,'Damaged')
UPDATE purchase_order_list SET quantity=1,refund=123.0 WHERE item_code=6 AND idinvoice=1
INSERT INTO return_list(transactNo,idproduct,total_net,returned_quantity) VALUES(1,6,123.0,1)
UPDATE invoice SET total_refund=123.00 WHERE idinvoice=1
INSERT INTO invoice_supplier(supplier_SOno,date_of_order,date_of_purchase,balance) VALUES('12313',STR_TO_DATE('2018-07-02','%Y-%m-%d'),STR_TO_DATE('2018-07-02','%Y-%m-%d'),0)
UPDATE product SET quantity=22 WHERE barcode='12345'
INSERT purchase_order_supplier(productID,productName,quantity,salesOrderNo) VALUES(6,'Roberta',20,3)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'Inventory IN',3,'Good Condition')
INSERT INTO invoice(payment_type,date_of_transaction,amount_paid,total_net) VALUES(234,(SELECT CURDATE()),700.0,615.0)
UPDATE product SET quantity=17 WHERE barcode='12345'
INSERT INTO purchase_order_list(idinvoice,item_code,item_name,quantity,unit_price,discount_percent,discounted_price,total_price) VALUES(2,6,'Roberta',5,123.0,0,123.0,615.0)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'Sales Order',2,'Cash')
INSERT INTO return_history(return_date,customer_name,return_reason,refund,invoiceID) VALUES((SELECT CURDATE()),'','Damaged',0.0,0)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'RETURN',0,'Damaged')
UPDATE purchase_order_list SET quantity=4,refund=123.0 WHERE item_code=6 AND idinvoice=2
INSERT INTO return_list(transactNo,idproduct,total_net,returned_quantity) VALUES(2,6,123.0,1)
UPDATE invoice SET total_refund=123.00 WHERE idinvoice=2
INSERT INTO return_history(return_date,customer_name,return_reason,refund,invoiceID) VALUES((SELECT CURDATE()),'','Change Size',123.0,2)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'RETURN',2,'Change Size')
UPDATE product SET quantity=18 WHERE idproduct=6
UPDATE purchase_order_list SET quantity=3,refund=123.0 WHERE item_code=6 AND idinvoice=2
INSERT INTO return_list(transactNo,idproduct,total_net,returned_quantity) VALUES(1,6,123.0,1)
UPDATE invoice SET total_refund=123.00 WHERE idinvoice=2
INSERT INTO return_history(return_date,customer_name,return_reason,refund,invoiceID) VALUES((SELECT CURDATE()),'','Damaged',369.0,2)
INSERT INTO inventory_transactions(transact_date,transact_type,POid,remarks) VALUES((SELECT CURDATE()),'RETURN',2,'Damaged')
UPDATE purchase_order_list SET quantity=0,refund=369.0 WHERE item_code=6 AND idinvoice=2
INSERT INTO return_list(transactNo,idproduct,total_net,returned_quantity) VALUES(2,6,369.0,3)
UPDATE invoice SET total_refund=369.00 WHERE idinvoice=2