Στην εγκατάσταση επιλέγουμε τη σύνδεση eshop με SQL server.
Φτιάχνουμε τα αντίστοιχα queries στα παρακάτω αρχεία στο φάκελο reports:
Λήψη ειδών
sync_connect_products.sql
| id | Κωδικός |
| name | Τίτλος |
| price | Αξία |
| notes | Σημειώσεις |
| weight | Βάρος |
| category | Κατηγορία |
| vat | Ποσοστό ΦΠΑ |
| supplierid | Κωδικός προμηθευτή |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
select str(example_product_id) as id, example_supplier_id as supplierid, example_product_name as name, cast(example_product_price as FLOAT) as price, cast(example_product_notes as VARCHAR(1000)) as notes, example_product_weight as weight, example_product_category as category, cast(example_product_vat as FLOAT) as vat from example_products where example_product_created >= :lastupdate |
Λήψη παραγγελιών
sync_connect_orders.sql
| id | Αριθμός παραγγελίας |
| date | Ημερομηνία |
| firstname | Όνομα |
| lastname | Επίθετο |
| phone | Τηλέφωνο |
| mobile | Κινητό |
| company | Επωνυμία |
| occupation | Επάγγελμα |
| address | Διεύθυνση |
| city | Πόλη |
| zip | ΤΚ |
| vat | ΑΦΜ |
| taxoffice | ΔΟΥ |
| recipient_lastname | Επίθετο παραλήπτη |
| recipient_firstname | Όνομα παραλήπτη |
| recipient_address | Διεύθυνση παραλήπτη |
| recipient_zip | ΤΚ παραλήπτη |
| recipient_area | Περιοχή παραλήπτη |
| recipient_city | Πόλη παραλήπτη |
| recipient_floor | Όροφος παραλήπτη |
| recipient_mobile | Κινητό παραλήπτη |
| recipient_phone | Τηλέφωνο παραλήπτη |
| recipient_email | Email παραλήπτη |
| shipping_method | Τρόπος αποστολής |
| shipping_cost | Κόστος αποστολής |
| payment_method | Τρόπος πληρωμής |
| coupon_title | Τίτλος κουπονιού |
| coupon | Αξία κουπονιού |
| discount | Έκπτωση |
| package_cost | Αξία συσκευασίας |
| package_title | Τίτλος συσκευασίας |
| doc_title | Τίτλος παραστατικού |
| notes | Σημειώσεις |
|
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 |
select str(example_orders_id) as id, example_orders_date as date, example_orders_firstname as firstname, example_orders_lastname as lastname, example_orders_phone as phone, example_orders_mobile as mobile, example_orders_email as email, example_orders_company as company, example_orders_occupation as occupation, example_orders_address as address, example_orders_city as city, example_orders_zip as zip, example_orders_vat as vat, example_orders_taxoffice as taxoffice, example_orders_recipientlastname as recipient_lastname, example_orders_recipientaddress as recipient_address, example_orders_recipientfirstname as recipient_firstname, example_orders_recipientzip as recipient_zip, example_orders_recipientarea as recipient_area, example_orders_recipientcity as recipient_city, example_orders_floor as recipient_floor, example_orders_packagecost as package_cost, example_orders_coupontitle as coupon_title, example_orders_couponprice as coupon, example_orders_shipping as shipping_method, example_orders_shippingcost as shipping_cost, example_orders_payment as payment_method, example_orders_recipientemail as recipient_email, example_orders_discount as discount, example_orders_recipientmobile as recipient_mobile, example_orders_recipientphone as recipient_phone, example_orders_package as package_title, example_orders_doctitle as doc_title, example_orders_notes as notes from example_orders where example_orders_created >= :lastupdate |
Λήψη γραμμών παραγγελίας
sync_connect_orderlines.sql
| pid | Αριθμός παραγγελίας |
| description | Περιγραφή |
| quantity | Ποσότητα |
| price | Αξία |
| vat | ΦΠΑ |
|
1 2 3 4 5 6 7 8 9 |
select example_order_id as pid, example_order_description as description, example_order_quantity as quantity, example_order_price as price, example_order_vat as vat from example_order where example_order_id = :orderid |


