Subversion Repositories SmartDukaan

Rev

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

Rev 22728 Rev 22749
Line 11538... Line 11538...
11538
    except:
11538
    except:
11539
        logging.info("Tried accessing counter for user id {0} - {1}".format(transaction.customer_id, transaction.orders[0].customer_email))
11539
        logging.info("Tried accessing counter for user id {0} - {1}".format(transaction.customer_id, transaction.orders[0].customer_email))
11540
        return False
11540
        return False
11541
    finally:
11541
    finally:
11542
        session.close()
11542
        session.close()
-
 
11543
 
-
 
11544
 
-
 
11545
 
-
 
11546
 
-
 
11547
def is_shipment_cod(logisticsTransactionId):
-
 
11548
    orders = Order.query.filter_by(logistics_transaction_id=logisticsTransactionId).all()
-
 
11549
    net_payable = 0
-
 
11550
    for order in orders:
-
 
11551
        if order.cod == 0:
-
 
11552
            return False
-
 
11553
        else:
-
 
11554
            net_payable += order.net_payable
-
 
11555
    
-
 
11556
    return True if net_payable > 0 else False
-
 
11557
    
-
 
11558
    
-
 
11559
 
-
 
11560
 
-
 
11561
 
-
 
11562
 
-
 
11563
 
-
 
11564
 
-
 
11565
 
11543
if __name__ == '__main__':
11566
if __name__ == '__main__':
11544
    DataService.initialize()
11567
    DataService.initialize()
11545
    #transaction_ids=[1030084,1030087,1030090,1030093,1030096,1030099,1030102,1030105,1030108,1030111,1030114,1030117,1030120,1030123,1030144,1030147,1030153]
11568
    #transaction_ids=[1030084,1030087,1030090,1030093,1030096,1030099,1030102,1030105,1030108,1030111,1030114,1030117,1030120,1030123,1030144,1030147,1030153]
11546
    transaction_ids=[]
11569
    transaction_ids=[]
11547
#    mark_order_for_selfpickup_temp(transaction_ids)
11570
#    mark_order_for_selfpickup_temp(transaction_ids)