Subversion Repositories SmartDukaan

Rev

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

Rev 6092 Rev 6094
Line 3469... Line 3469...
3469
            providerId = 0
3469
            providerId = 0
3470
        else:
3470
        else:
3471
            providerId = get_provider_id(providerCode)
3471
            providerId = get_provider_id(providerCode)
3472
    except:
3472
    except:
3473
        providerId = -1
3473
        providerId = -1
3474
    
-
 
3475
        
3474
        
3476
    return providerId
3475
    return providerId
3477
    
3476
    
3478
def update_amount_in_wallet(userId, amount, orderId):
3477
def update_amount_in_wallet(userId, amount, orderId):
3479
    if amount == 0:
3478
    if amount == 0:
Line 3486... Line 3485...
3486
    history.orderId = orderId
3485
    history.orderId = orderId
3487
    history.wallet = wallet
3486
    history.wallet = wallet
3488
    history.timestamp = datetime.datetime.now()
3487
    history.timestamp = datetime.datetime.now()
3489
    session.commit()
3488
    session.commit()
3490
 
3489
 
-
 
3490
def get_recharge_orders_for_transaction(deviceNumber):
-
 
3491
    return RechargeOrder.query.filter_by(transaction_id = txId).first()
-
 
3492
 
-
 
3493
def get_recharge_orders_for_device(deviceNumber):
-
 
3494
    orders = MobileRechargeOrder.query.filter_by(mobileNumber = deviceNumber).all()
-
 
3495
    if orders is None:
-
 
3496
        orders = DTHRechargeOrder.query.filter_by(dthAccountNumber = deviceNumber).all()
-
 
3497
    return orders
-
 
3498
 
3491
def get_recharge_orders_for_transaction(txId):
3499
def get_recharge_orders_for_transaction(txId):
3492
    return RechargeOrder.query.filter_by(transaction_id = txId).first()
3500
    return RechargeOrder.query.filter_by(transaction_id = txId).first()
3493
    
3501
    
3494
        
3502
        
3495
def close_session():
3503
def close_session():