Subversion Repositories SmartDukaan

Rev

Rev 412 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 412 Rev 434
Line 4... Line 4...
4
@author: ashish
4
@author: ashish
5
'''
5
'''
6
import xlwt
6
import xlwt
7
from shop2020.clients.LogisticsClient import LogisticsClient
7
from shop2020.clients.LogisticsClient import LogisticsClient
8
 
8
 
-
 
9
def get_html_page():
-
 
10
    a = '''<html>
-
 
11
            <head>
-
 
12
            <meta content="text/html; charset=ISO-8859-1"
-
 
13
            http-equiv="content-type">
-
 
14
            <title>Logistics Dashbaord</title>
-
 
15
            </head>
-
 
16
            <body>
-
 
17
            <h2>Aramex dashboard<br>
-
 
18
            </h2>
-
 
19
            <br>
-
 
20
            <hr style="width: 100%; height: 2px;">
-
 
21
            <h3>Package related links</h3>
-
 
22
            <ol>
-
 
23
            <li><a href="/list">Get today's packages</a></li>
-
 
24
            </ol>
-
 
25
            </body>
-
 
26
            </html>'''
-
 
27
    return a
-
 
28
            
-
 
29
 
-
 
30
def get_sample_xml():
-
 
31
    xml = open("/tmp/AWB_Track.xml", 'r').read()
-
 
32
    return xml
-
 
33
 
9
def get_xls_for_today(warehouse):
34
def get_xls_for_today(warehouse):
10
    book = xlwt.Workbook(encoding="utf8")
35
    book = xlwt.Workbook(encoding="utf8")
11
    sheet = book.add_sheet("Shipment", True);
36
    sheet = book.add_sheet("Shipment", True);
12
    sheet.write(0,0, "No shipments")
37
    sheet.write(0,0, "No shipments")
13
    
38