| Line 9061... |
Line 9061... |
| 9061 |
credit_hs_query = credit_hs_query.filter(CreditHistory.user_id==userId)
|
9061 |
credit_hs_query = credit_hs_query.filter(CreditHistory.user_id==userId)
|
| 9062 |
if creditorId and creditorId>0:
|
9062 |
if creditorId and creditorId>0:
|
| 9063 |
credit_hs_query = credit_hs_query.filter(CreditHistory.creditor_id==creditorId)
|
9063 |
credit_hs_query = credit_hs_query.filter(CreditHistory.creditor_id==creditorId)
|
| 9064 |
if creditTxnType:
|
9064 |
if creditTxnType:
|
| 9065 |
credit_hs_query = credit_hs_query.filter(CreditHistory.credit_type==CreditTxnType._VALUES_TO_NAMES[creditTxnType])
|
9065 |
credit_hs_query = credit_hs_query.filter(CreditHistory.credit_type==CreditTxnType._VALUES_TO_NAMES[creditTxnType])
|
| 9066 |
credit_hs_query = credit_hs_query.offset(offset)
|
- |
|
| 9067 |
if limit:
|
- |
|
| 9068 |
credit_hs_query = credit_hs_query.limit(limit)
|
- |
|
| 9069 |
credit_hs_query = credit_hs_query.order_by(desc(CreditHistory.created))
|
9066 |
credit_hs_query = credit_hs_query.order_by(desc(CreditHistory.created))
|
| - |
|
9067 |
if limit>0:
|
| - |
|
9068 |
credit_hs_query = credit_hs_query.limit(limit)
|
| - |
|
9069 |
if offset>0 and limit >0:
|
| - |
|
9070 |
credit_hs_query = credit_hs_query.offset(offset)
|
| 9070 |
return credit_hs_query.all()
|
9071 |
return credit_hs_query.all()
|
| 9071 |
|
9072 |
|
| 9072 |
def process_credit_transaction(paymentId, userId, creditorId, creditTxns, invoiceNumber=None):
|
9073 |
def process_credit_transaction(paymentId, userId, creditorId, creditTxns, invoiceNumber=None):
|
| 9073 |
us_query = UserSanction.query
|
9074 |
us_query = UserSanction.query
|
| 9074 |
if userId:
|
9075 |
if userId:
|
| Line 9168... |
Line 9169... |
| 9168 |
loan_hs_query = loan_hs_query.filter(LoanHistory.user_id==userId)
|
9169 |
loan_hs_query = loan_hs_query.filter(LoanHistory.user_id==userId)
|
| 9169 |
if creditorId and creditorId>0:
|
9170 |
if creditorId and creditorId>0:
|
| 9170 |
loan_hs_query = loan_hs_query.filter(LoanHistory.creditor_id==creditorId)
|
9171 |
loan_hs_query = loan_hs_query.filter(LoanHistory.creditor_id==creditorId)
|
| 9171 |
if creditTxnType:
|
9172 |
if creditTxnType:
|
| 9172 |
loan_hs_query = loan_hs_query.filter(LoanHistory.credit_type==CreditTxnType._VALUES_TO_NAMES[creditTxnType])
|
9173 |
loan_hs_query = loan_hs_query.filter(LoanHistory.credit_type==CreditTxnType._VALUES_TO_NAMES[creditTxnType])
|
| 9173 |
loan_hs_query = loan_hs_query.offset(offset)
|
- |
|
| 9174 |
if limit:
|
- |
|
| 9175 |
loan_hs_query = loan_hs_query.limit(limit)
|
- |
|
| 9176 |
loan_hs_query = loan_hs_query.order_by(desc(LoanHistory.created))
|
9174 |
loan_hs_query = loan_hs_query.order_by(desc(LoanHistory.created))
|
| - |
|
9175 |
if limit>0:
|
| - |
|
9176 |
loan_hs_query = loan_hs_query.limit(limit)
|
| - |
|
9177 |
if offset>0 and limit>0:
|
| - |
|
9178 |
loan_hs_query = loan_hs_query.offset(offset)
|
| - |
|
9179 |
|
| 9177 |
return loan_hs_query.all()
|
9180 |
return loan_hs_query.all()
|
| 9178 |
|
9181 |
|
| 9179 |
def process_loan_transaction(paymentId, userId, creditorId, loantxns):
|
9182 |
def process_loan_transaction(paymentId, userId, creditorId, loantxns):
|
| 9180 |
us_query = UserSanction.query
|
9183 |
us_query = UserSanction.query
|
| 9181 |
if userId:
|
9184 |
if userId:
|