Subversion Repositories SmartDukaan

Rev

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

Rev 5846 Rev 5855
Line 699... Line 699...
699
    except Exception as e:
699
    except Exception as e:
700
        print e
700
        print e
701
        return False
701
        return False
702
 
702
 
703
def __get_secret_code(order_id):
703
def __get_secret_code(order_id):
704
    get_order_attribute_value(order_id, 'SECRET_CODE')
704
    return get_order_attribute_value(order_id, 'SECRET_CODE')
705
 
705
 
706
def get_order_attribute_value(order_id, attribute_name):
706
def get_order_attribute_value(order_id, attribute_name):
707
    existingAttribute = Attribute.query.filter(Attribute.orderId == order_id).filter(Attribute.name == attribute_name).first()
707
    existingAttribute = Attribute.query.filter(Attribute.orderId == order_id).filter(Attribute.name == attribute_name).first()
708
    if existingAttribute:
708
    if existingAttribute:
709
        return existingAttribute.value
709
        return existingAttribute.value
Line 2309... Line 2309...
2309
    address = address + store.city + "\n"
2309
    address = address + store.city + "\n"
2310
    address = address + store.state + "\n"
2310
    address = address + store.state + "\n"
2311
    address = address + "PIN - " + store.pin + "\n"
2311
    address = address + "PIN - " + store.pin + "\n"
2312
    if store.phone:
2312
    if store.phone:
2313
        address = address + "Phone - " + store.phone + "\n"
2313
        address = address + "Phone - " + store.phone + "\n"
2314
    address = address +  "Store timing - 11AM to 8PM (7 days)\n"
2314
    address = address +  "Store timings - 11AM to 8PM (7 days)\n"
2315
    return address
2315
    return address
2316
 
2316
 
2317
def __get_store_address_html(store):
2317
def __get_store_address_html(store):
2318
    address = store.name + "<br>" + store.line1 + "<br>"
2318
    address = store.name + "<br>" + store.line1 + "<br>"
2319
    if store.line2:
2319
    if store.line2:
Line 2321... Line 2321...
2321
    address = address + store.city + "<br>"
2321
    address = address + store.city + "<br>"
2322
    address = address + store.state + "<br>"
2322
    address = address + store.state + "<br>"
2323
    address = address + "PIN - " + store.pin + "<br>"
2323
    address = address + "PIN - " + store.pin + "<br>"
2324
    if store.phone:
2324
    if store.phone:
2325
        address = address + "Phone - " + store.phone + "<br>"
2325
        address = address + "Phone - " + store.phone + "<br>"
2326
    address = address +  "Store timing - 7 days: 11AM to 8PM  (7 days)<br>"
2326
    address = address +  "Store timings - 7 days: 11AM to 8PM  (7 days)<br>"
2327
    return address
2327
    return address
2328
 
2328
 
2329
def __generate_return_advice(order, warehouse, provider, filename):
2329
def __generate_return_advice(order, warehouse, provider, filename):
2330
    if warehouse.id == 7:
2330
    if warehouse.id == 7:
2331
        executive = 'Amit Kumar'
2331
        executive = 'Amit Kumar'