Subversion Repositories SmartDukaan

Rev

Rev 434 | Rev 2286 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 434 Rev 738
Line 26... Line 26...
26
        return java_date
26
        return java_date
27
    except:
27
    except:
28
        #some error here, return None
28
        #some error here, return None
29
        return None
29
        return None
30
 
30
 
31
def get_status_fdate_tdate(status, from_date, to_date):
31
def get_fdate_tdate(from_date, to_date):
32
    current_from_date = ""
32
    current_from_date = ""
33
    current_to_date = ""
33
    current_to_date = ""
34
    current_status = ""
-
 
35
    
-
 
36
    if status != None:
-
 
37
        current_status = OrderStatus.get_c_status(status)
-
 
38
    else:
-
 
39
        current_status = None
-
 
40
        
34
        
41
    if from_date:
35
    if from_date:
42
        current_from_date = to_py_date(from_date)   
36
        current_from_date = to_py_date(from_date)   
43
    if to_date:
37
    if to_date:
44
        current_to_date = to_py_date(to_date)
38
        current_to_date = to_py_date(to_date)
45
    
39
    
46
    return  current_status, current_from_date, current_to_date
40
    return current_from_date, current_to_date
47
 
41
 
48
def get_mssql_date(date):
42
def get_mssql_date(date):
49
    mssql_date_year = str(date.year)
43
    mssql_date_year = str(date.year)
50
    if date.month < 10:
44
    if date.month < 10:
51
        mssql_date_month = "0%d"%(date.month)
45
        mssql_date_month = "0%d"%(date.month)